summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2008-09-24 09:32:55 +0000
committerPeter Volkov <pva@gentoo.org>2008-09-24 09:32:55 +0000
commit7908f0a45928696784aba4923779a5f22d6ac1b8 (patch)
treef39327e85143412c35b05f98c52aa30e5e81159a /sys-kernel/openvz-sources
parentBug 238017, refix the migration of amandates. Sorry to the ~arch users. You w... (diff)
downloadgentoo-2-7908f0a45928696784aba4923779a5f22d6ac1b8.tar.gz
gentoo-2-7908f0a45928696784aba4923779a5f22d6ac1b8.tar.bz2
gentoo-2-7908f0a45928696784aba4923779a5f22d6ac1b8.zip
RHEL5 based kernels are too fragile to make them stable... Adding another kernel based on vanilla, added fix for 3ware-9xxx controller, bug #238496, thank Christian Schmitt for report.
(Portage version: 2.2_rc9/cvs/Linux 2.6.25-gentoo-r7 x86_64)
Diffstat (limited to 'sys-kernel/openvz-sources')
-rw-r--r--sys-kernel/openvz-sources/ChangeLog14
-rw-r--r--sys-kernel/openvz-sources/files/openvz-sources-2.6.18.028.056.1-3ware.patch430
-rw-r--r--sys-kernel/openvz-sources/files/openvz-sources-2.6.18.028.056.1-utimensat.patch18
-rw-r--r--sys-kernel/openvz-sources/openvz-sources-2.6.18.028.056.1.ebuild (renamed from sys-kernel/openvz-sources/openvz-sources-2.6.18.028.053.14.ebuild)16
-rw-r--r--sys-kernel/openvz-sources/openvz-sources-2.6.18.028.057.2.ebuild12
5 files changed, 476 insertions, 14 deletions
diff --git a/sys-kernel/openvz-sources/ChangeLog b/sys-kernel/openvz-sources/ChangeLog
index ead6be80ceee..906e1c371b52 100644
--- a/sys-kernel/openvz-sources/ChangeLog
+++ b/sys-kernel/openvz-sources/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for sys-kernel/openvz-sources
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/ChangeLog,v 1.93 2008/08/22 19:39:27 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/ChangeLog,v 1.94 2008/09/24 09:32:55 pva Exp $
+
+*openvz-sources-2.6.18.028.056.1 (24 Sep 2008)
+
+ 24 Sep 2008; Peter Volkov <pva@gentoo.org>
+ +files/openvz-sources-2.6.18.028.056.1-3ware.patch,
+ +files/openvz-sources-2.6.18.028.056.1-utimensat.patch,
+ -openvz-sources-2.6.18.028.053.14.ebuild,
+ +openvz-sources-2.6.18.028.056.1.ebuild,
+ openvz-sources-2.6.18.028.057.2.ebuild:
+ RHEL5 based kernels are too fragile to make them stable... Adding another
+ kernel based on vanilla, added fix for 3ware-9xxx controller, bug #238496,
+ thank Christian Schmitt for report.
*openvz-sources-2.6.18.028.057.2 (22 Aug 2008)
diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.18.028.056.1-3ware.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.18.028.056.1-3ware.patch
new file mode 100644
index 000000000000..3f509f180714
--- /dev/null
+++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.18.028.056.1-3ware.patch
@@ -0,0 +1,430 @@
+From: Chip Coldwell <coldwell@redhat.com>
+Subject: [RHEL-5.1 PATCH] bz223465 3ware 9650SE not recognized by updated 3w-9xxx module
+Date: Thu, 31 May 2007 15:40:55 -0400 (EDT)
+Bugzilla: 223465
+Message-Id: <Pine.LNX.4.64.0705311538030.3365@bogart.boston.redhat.com>
+Changelog: [scsi] 3ware 9650SE not recognized by updated 3w-9xxx module
+
+
+This is a literal (i.e. no changes) backport of the upstream commit
+below. I do not have the 9650SE hardware, so I tested on a 9500S for
+regressions (using iozone). I think we might as well include the
+whole patch instead of just cherry-picking out the hardware support,
+since the other two changes look like fixes we want anyway.
+
+commit 4039c30ef5d9189ff8dc72aaf610d1c933877e20
+Author: adam radford <aradford@gmail.com>
+
+ [SCSI] 3ware 9000 add support for 9650SE
+
+ Updates the 3ware 9000 driver:
+
+ - Free irq handler in __twa_shutdown().
+ - Serialize reset code.
+ - Add support for 9650SE controllers.
+
+ Signed-off-by: Adam Radford <linuxraid@amcc.com>
+ Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
+
+diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
+index 5f8c26c..b091a0f 100644
+--- a/drivers/scsi/3w-9xxx.c
++++ b/drivers/scsi/3w-9xxx.c
+@@ -66,6 +66,9 @@
+ 2.26.02.006 - Fix 9550SX pchip reset timeout.
+ Add big endian support.
+ 2.26.02.007 - Disable local interrupts during kmap/unmap_atomic().
++ 2.26.02.008 - Free irq handler in __twa_shutdown().
++ Serialize reset code.
++ Add support for 9650SE controllers.
+ */
+
+ #include <linux/module.h>
+@@ -89,7 +92,7 @@
+ #include "3w-9xxx.h"
+
+ /* Globals */
+-#define TW_DRIVER_VERSION "2.26.02.007"
++#define TW_DRIVER_VERSION "2.26.02.008"
+ static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT];
+ static unsigned int twa_device_extension_count;
+ static int twa_major = -1;
+@@ -566,9 +569,9 @@ static int twa_check_srl(TW_Device_Extension *tw_dev, int *flashed)
+ goto out;
+ }
+
+- tw_dev->working_srl = fw_on_ctlr_srl;
+- tw_dev->working_branch = fw_on_ctlr_branch;
+- tw_dev->working_build = fw_on_ctlr_build;
++ tw_dev->tw_compat_info.working_srl = fw_on_ctlr_srl;
++ tw_dev->tw_compat_info.working_branch = fw_on_ctlr_branch;
++ tw_dev->tw_compat_info.working_build = fw_on_ctlr_build;
+
+ /* Try base mode compatibility */
+ if (!(init_connect_result & TW_CTLR_FW_COMPATIBLE)) {
+@@ -590,10 +593,23 @@ static int twa_check_srl(TW_Device_Extension *tw_dev, int *flashed)
+ }
+ goto out;
+ }
+- tw_dev->working_srl = TW_BASE_FW_SRL;
+- tw_dev->working_branch = TW_BASE_FW_BRANCH;
+- tw_dev->working_build = TW_BASE_FW_BUILD;
+- }
++ tw_dev->tw_compat_info.working_srl = TW_BASE_FW_SRL;
++ tw_dev->tw_compat_info.working_branch = TW_BASE_FW_BRANCH;
++ tw_dev->tw_compat_info.working_build = TW_BASE_FW_BUILD;
++ }
++
++ /* Load rest of compatibility struct */
++ strncpy(tw_dev->tw_compat_info.driver_version, TW_DRIVER_VERSION, strlen(TW_DRIVER_VERSION));
++ tw_dev->tw_compat_info.driver_srl_high = TW_CURRENT_DRIVER_SRL;
++ tw_dev->tw_compat_info.driver_branch_high = TW_CURRENT_DRIVER_BRANCH;
++ tw_dev->tw_compat_info.driver_build_high = TW_CURRENT_DRIVER_BUILD;
++ tw_dev->tw_compat_info.driver_srl_low = TW_BASE_FW_SRL;
++ tw_dev->tw_compat_info.driver_branch_low = TW_BASE_FW_BRANCH;
++ tw_dev->tw_compat_info.driver_build_low = TW_BASE_FW_BUILD;
++ tw_dev->tw_compat_info.fw_on_ctlr_srl = fw_on_ctlr_srl;
++ tw_dev->tw_compat_info.fw_on_ctlr_branch = fw_on_ctlr_branch;
++ tw_dev->tw_compat_info.fw_on_ctlr_build = fw_on_ctlr_build;
++
+ retval = 0;
+ out:
+ return retval;
+@@ -631,7 +647,7 @@ static int twa_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int
+ goto out2;
+
+ /* Check data buffer size */
+- if (driver_command.buffer_length > TW_MAX_SECTORS * 512) {
++ if (driver_command.buffer_length > TW_MAX_SECTORS * 2048) {
+ retval = TW_IOCTL_ERROR_OS_EINVAL;
+ goto out2;
+ }
+@@ -680,13 +696,6 @@ static int twa_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int
+ /* Now wait for command to complete */
+ timeout = wait_event_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout);
+
+- /* See if we reset while waiting for the ioctl to complete */
+- if (test_bit(TW_IN_RESET, &tw_dev->flags)) {
+- clear_bit(TW_IN_RESET, &tw_dev->flags);
+- retval = TW_IOCTL_ERROR_OS_ERESTARTSYS;
+- goto out3;
+- }
+-
+ /* We timed out, and didn't get an interrupt */
+ if (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE) {
+ /* Now we need to reset the board */
+@@ -694,11 +703,6 @@ static int twa_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int
+ tw_dev->host->host_no, TW_DRIVER, 0xc,
+ cmd);
+ retval = TW_IOCTL_ERROR_OS_EIO;
+- spin_lock_irqsave(tw_dev->host->host_lock, flags);
+- tw_dev->state[request_id] = TW_S_COMPLETED;
+- twa_free_request_id(tw_dev, request_id);
+- tw_dev->posted_request_count--;
+- spin_unlock_irqrestore(tw_dev->host->host_lock, flags);
+ twa_reset_device_extension(tw_dev, 1);
+ goto out3;
+ }
+@@ -717,16 +721,7 @@ static int twa_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int
+ tw_ioctl->driver_command.status = 0;
+ /* Copy compatiblity struct into ioctl data buffer */
+ tw_compat_info = (TW_Compatibility_Info *)tw_ioctl->data_buffer;
+- strncpy(tw_compat_info->driver_version, TW_DRIVER_VERSION, strlen(TW_DRIVER_VERSION));
+- tw_compat_info->working_srl = tw_dev->working_srl;
+- tw_compat_info->working_branch = tw_dev->working_branch;
+- tw_compat_info->working_build = tw_dev->working_build;
+- tw_compat_info->driver_srl_high = TW_CURRENT_DRIVER_SRL;
+- tw_compat_info->driver_branch_high = TW_CURRENT_DRIVER_BRANCH;
+- tw_compat_info->driver_build_high = TW_CURRENT_DRIVER_BUILD;
+- tw_compat_info->driver_srl_low = TW_BASE_FW_SRL;
+- tw_compat_info->driver_branch_low = TW_BASE_FW_BRANCH;
+- tw_compat_info->driver_build_low = TW_BASE_FW_BUILD;
++ memcpy(tw_compat_info, &tw_dev->tw_compat_info, sizeof(TW_Compatibility_Info));
+ break;
+ case TW_IOCTL_GET_LAST_EVENT:
+ if (tw_dev->event_queue_wrapped) {
+@@ -895,7 +890,8 @@ static int twa_decode_bits(TW_Device_Extension *tw_dev, u32 status_reg_value)
+ }
+
+ if (status_reg_value & TW_STATUS_QUEUE_ERROR) {
+- TW_PRINTK(tw_dev->host, TW_DRIVER, 0xe, "Controller Queue Error: clearing");
++ if ((tw_dev->tw_pci_dev->device != PCI_DEVICE_ID_3WARE_9650SE) || (!test_bit(TW_IN_RESET, &tw_dev->flags)))
++ TW_PRINTK(tw_dev->host, TW_DRIVER, 0xe, "Controller Queue Error: clearing");
+ writel(TW_CONTROL_CLEAR_QUEUE_ERROR, TW_CONTROL_REG_ADDR(tw_dev));
+ }
+
+@@ -939,10 +935,12 @@ static int twa_empty_response_queue_large(TW_Device_Extension *tw_dev)
+ unsigned long before;
+ int retval = 1;
+
+- if (tw_dev->tw_pci_dev->device == PCI_DEVICE_ID_3WARE_9550SX) {
++ if ((tw_dev->tw_pci_dev->device == PCI_DEVICE_ID_3WARE_9550SX) ||
++ (tw_dev->tw_pci_dev->device == PCI_DEVICE_ID_3WARE_9650SE)) {
+ before = jiffies;
+ while ((response_que_value & TW_9550SX_DRAIN_COMPLETED) != TW_9550SX_DRAIN_COMPLETED) {
+ response_que_value = readl(TW_RESPONSE_QUEUE_REG_ADDR_LARGE(tw_dev));
++ msleep(1);
+ if (time_after(jiffies, before + HZ * 30))
+ goto out;
+ }
+@@ -1214,6 +1212,10 @@ static irqreturn_t twa_interrupt(int irq, void *dev_instance)
+
+ handled = 1;
+
++ /* If we are resetting, bail */
++ if (test_bit(TW_IN_RESET, &tw_dev->flags))
++ goto twa_interrupt_bail;
++
+ /* Check controller for errors */
+ if (twa_check_bits(status_reg_value)) {
+ if (twa_decode_bits(tw_dev, status_reg_value)) {
+@@ -1355,8 +1357,8 @@ static void twa_load_sgl(TW_Command_Full *full_command_packet, int request_id, d
+
+ if (TW_OP_OUT(full_command_packet->command.newcommand.opcode__reserved) == TW_OP_EXECUTE_SCSI) {
+ newcommand = &full_command_packet->command.newcommand;
+- newcommand->request_id__lunl =
+- TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->request_id__lunl), request_id);
++ newcommand->request_id__lunl =
++ cpu_to_le16(TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->request_id__lunl), request_id));
+ newcommand->sg_list[0].address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1);
+ newcommand->sg_list[0].length = cpu_to_le32(length);
+ newcommand->sgl_entries__lunh =
+@@ -1531,6 +1533,13 @@ static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id,
+ int retval = 1;
+
+ command_que_value = tw_dev->command_packet_phys[request_id];
++
++ /* For 9650SE write low 4 bytes first */
++ if (tw_dev->tw_pci_dev->device == PCI_DEVICE_ID_3WARE_9650SE) {
++ command_que_value += TW_COMMAND_OFFSET;
++ writel((u32)command_que_value, TW_COMMAND_QUEUE_REG_ADDR_LARGE(tw_dev));
++ }
++
+ status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
+
+ if (twa_check_bits(status_reg_value))
+@@ -1557,13 +1566,17 @@ static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id,
+ TW_UNMASK_COMMAND_INTERRUPT(tw_dev);
+ goto out;
+ } else {
+- /* We successfully posted the command packet */
+- if (sizeof(dma_addr_t) > 4) {
+- command_que_value += TW_COMMAND_OFFSET;
+- writel((u32)command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev));
+- writel((u32)((u64)command_que_value >> 32), TW_COMMAND_QUEUE_REG_ADDR(tw_dev) + 0x4);
++ if (tw_dev->tw_pci_dev->device == PCI_DEVICE_ID_3WARE_9650SE) {
++ /* Now write upper 4 bytes */
++ writel((u32)((u64)command_que_value >> 32), TW_COMMAND_QUEUE_REG_ADDR_LARGE(tw_dev) + 0x4);
+ } else {
+- writel(TW_COMMAND_OFFSET + command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev));
++ if (sizeof(dma_addr_t) > 4) {
++ command_que_value += TW_COMMAND_OFFSET;
++ writel((u32)command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev));
++ writel((u32)((u64)command_que_value >> 32), TW_COMMAND_QUEUE_REG_ADDR(tw_dev) + 0x4);
++ } else {
++ writel(TW_COMMAND_OFFSET + command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev));
++ }
+ }
+ tw_dev->state[request_id] = TW_S_POSTED;
+ tw_dev->posted_request_count++;
+@@ -1620,14 +1633,9 @@ static int twa_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_res
+ goto out;
+
+ TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev);
++ clear_bit(TW_IN_RESET, &tw_dev->flags);
++ tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE;
+
+- /* Wake up any ioctl that was pending before the reset */
+- if ((tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE) || (ioctl_reset)) {
+- clear_bit(TW_IN_RESET, &tw_dev->flags);
+- } else {
+- tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE;
+- wake_up(&tw_dev->ioctl_wqueue);
+- }
+ retval = 0;
+ out:
+ return retval;
+@@ -1736,6 +1744,9 @@ static int twa_scsi_eh_reset(struct scsi_cmnd *SCpnt)
+ "WARNING: (0x%02X:0x%04X): Command (0x%x) timed out, resetting card.\n",
+ TW_DRIVER, 0x2c, SCpnt->cmnd[0]);
+
++ /* Make sure we are not issuing an ioctl or resetting from ioctl */
++ mutex_lock(&tw_dev->ioctl_lock);
++
+ /* Now reset the card and some of the device extension data */
+ if (twa_reset_device_extension(tw_dev, 0)) {
+ TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2b, "Controller reset failed during scsi host reset");
+@@ -1744,6 +1755,7 @@ static int twa_scsi_eh_reset(struct scsi_cmnd *SCpnt)
+
+ retval = SUCCESS;
+ out:
++ mutex_unlock(&tw_dev->ioctl_lock);
+ return retval;
+ } /* End twa_scsi_eh_reset() */
+
+@@ -1753,8 +1765,14 @@ static int twa_scsi_queue(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd
+ int request_id, retval;
+ TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata;
+
++ /* If we are resetting due to timed out ioctl, report as busy */
++ if (test_bit(TW_IN_RESET, &tw_dev->flags)) {
++ retval = SCSI_MLQUEUE_HOST_BUSY;
++ goto out;
++ }
++
+ /* Check if this FW supports luns */
+- if ((SCpnt->device->lun != 0) && (tw_dev->working_srl < TW_FW_SRL_LUNS_SUPPORTED)) {
++ if ((SCpnt->device->lun != 0) && (tw_dev->tw_compat_info.working_srl < TW_FW_SRL_LUNS_SUPPORTED)) {
+ SCpnt->result = (DID_BAD_TARGET << 16);
+ done(SCpnt);
+ retval = 0;
+@@ -1960,6 +1978,9 @@ static void __twa_shutdown(TW_Device_Extension *tw_dev)
+ /* Disable interrupts */
+ TW_DISABLE_INTERRUPTS(tw_dev);
+
++ /* Free up the IRQ */
++ free_irq(tw_dev->tw_pci_dev->irq, tw_dev);
++
+ printk(KERN_WARNING "3w-9xxx: Shutting down host %d.\n", tw_dev->host->host_no);
+
+ /* Tell the card we are shutting down */
+@@ -2091,21 +2112,25 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
+
+ /* Initialize the card */
+ if (twa_reset_sequence(tw_dev, 0))
+- goto out_release_mem_region;
++ goto out_iounmap;
+
+ /* Set host specific parameters */
+- host->max_id = TW_MAX_UNITS;
++ if (pdev->device == PCI_DEVICE_ID_3WARE_9650SE)
++ host->max_id = TW_MAX_UNITS_9650SE;
++ else
++ host->max_id = TW_MAX_UNITS;
++
+ host->max_cmd_len = TW_MAX_CDB_LEN;
+
+ /* Channels aren't supported by adapter */
+- host->max_lun = TW_MAX_LUNS(tw_dev->working_srl);
++ host->max_lun = TW_MAX_LUNS(tw_dev->tw_compat_info.working_srl);
+ host->max_channel = 0;
+
+ /* Register the card with the kernel SCSI layer */
+ retval = scsi_add_host(host, &pdev->dev);
+ if (retval) {
+ TW_PRINTK(tw_dev->host, TW_DRIVER, 0x27, "scsi add host failed");
+- goto out_release_mem_region;
++ goto out_iounmap;
+ }
+
+ pci_set_drvdata(pdev, host);
+@@ -2145,6 +2170,8 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
+
+ out_remove_host:
+ scsi_remove_host(host);
++out_iounmap:
++ iounmap(tw_dev->base_addr);
+ out_release_mem_region:
+ pci_release_regions(pdev);
+ out_free_device_extension:
+@@ -2170,12 +2197,12 @@ static void twa_remove(struct pci_dev *pdev)
+ twa_major = -1;
+ }
+
+- /* Free up the IRQ */
+- free_irq(tw_dev->tw_pci_dev->irq, tw_dev);
+-
+ /* Shutdown the card */
+ __twa_shutdown(tw_dev);
+
++ /* Free IO remapping */
++ iounmap(tw_dev->base_addr);
++
+ /* Free up the mem region */
+ pci_release_regions(pdev);
+
+@@ -2193,6 +2220,8 @@ static struct pci_device_id twa_pci_tbl[] __devinitdata = {
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9550SX,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
++ { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9650SE,
++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { }
+ };
+ MODULE_DEVICE_TABLE(pci, twa_pci_tbl);
+diff --git a/drivers/scsi/3w-9xxx.h b/drivers/scsi/3w-9xxx.h
+index e5685be..7901517 100644
+--- a/drivers/scsi/3w-9xxx.h
++++ b/drivers/scsi/3w-9xxx.h
+@@ -289,7 +289,6 @@ static twa_message_type twa_error_table[] = {
+ #define TW_STATUS_VALID_INTERRUPT 0x00DF0000
+
+ /* PCI related defines */
+-#define TW_NUMDEVICES 1
+ #define TW_PCI_CLEAR_PARITY_ERRORS 0xc100
+ #define TW_PCI_CLEAR_PCI_ABORT 0x2000
+
+@@ -335,6 +334,7 @@ static twa_message_type twa_error_table[] = {
+ #define TW_ALIGNMENT_9000 4 /* 4 bytes */
+ #define TW_ALIGNMENT_9000_SGL 0x3
+ #define TW_MAX_UNITS 16
++#define TW_MAX_UNITS_9650SE 32
+ #define TW_INIT_MESSAGE_CREDITS 0x100
+ #define TW_INIT_COMMAND_PACKET_SIZE 0x3
+ #define TW_INIT_COMMAND_PACKET_SIZE_EXTENDED 0x6
+@@ -354,7 +354,6 @@ static twa_message_type twa_error_table[] = {
+ #define TW_MAX_RESPONSE_DRAIN 256
+ #define TW_MAX_AEN_DRAIN 40
+ #define TW_IN_RESET 2
+-#define TW_IN_CHRDEV_IOCTL 3
+ #define TW_IN_ATTENTION_LOOP 4
+ #define TW_MAX_SECTORS 256
+ #define TW_AEN_WAIT_TIME 1000
+@@ -417,6 +416,9 @@ static twa_message_type twa_error_table[] = {
+ #ifndef PCI_DEVICE_ID_3WARE_9550SX
+ #define PCI_DEVICE_ID_3WARE_9550SX 0x1003
+ #endif
++#ifndef PCI_DEVICE_ID_3WARE_9650SE
++#define PCI_DEVICE_ID_3WARE_9650SE 0x1004
++#endif
+
+ /* Bitmask macros to eliminate bitfields */
+
+@@ -442,6 +444,7 @@ static twa_message_type twa_error_table[] = {
+ #define TW_CONTROL_REG_ADDR(x) (x->base_addr)
+ #define TW_STATUS_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0x4)
+ #define TW_COMMAND_QUEUE_REG_ADDR(x) (sizeof(dma_addr_t) > 4 ? ((unsigned char __iomem *)x->base_addr + 0x20) : ((unsigned char __iomem *)x->base_addr + 0x8))
++#define TW_COMMAND_QUEUE_REG_ADDR_LARGE(x) ((unsigned char __iomem *)x->base_addr + 0x20)
+ #define TW_RESPONSE_QUEUE_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0xC)
+ #define TW_RESPONSE_QUEUE_REG_ADDR_LARGE(x) ((unsigned char __iomem *)x->base_addr + 0x30)
+ #define TW_CLEAR_ALL_INTERRUPTS(x) (writel(TW_STATUS_VALID_INTERRUPT, TW_CONTROL_REG_ADDR(x)))
+@@ -626,6 +629,9 @@ typedef struct TAG_TW_Compatibility_Info
+ unsigned short driver_srl_low;
+ unsigned short driver_branch_low;
+ unsigned short driver_build_low;
++ unsigned short fw_on_ctlr_srl;
++ unsigned short fw_on_ctlr_branch;
++ unsigned short fw_on_ctlr_build;
+ } TW_Compatibility_Info;
+
+ #pragma pack()
+@@ -668,9 +674,7 @@ typedef struct TAG_TW_Device_Extension {
+ wait_queue_head_t ioctl_wqueue;
+ struct mutex ioctl_lock;
+ char aen_clobber;
+- unsigned short working_srl;
+- unsigned short working_branch;
+- unsigned short working_build;
++ TW_Compatibility_Info tw_compat_info;
+ } TW_Device_Extension;
+
+ #endif /* _3W_9XXX_H */
+
+Chip
+
+--
+Charles M. "Chip" Coldwell
+Senior Software Engineer
+Red Hat, Inc
+978-392-2426
+
diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.18.028.056.1-utimensat.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.18.028.056.1-utimensat.patch
new file mode 100644
index 000000000000..7ddc69688618
--- /dev/null
+++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.18.028.056.1-utimensat.patch
@@ -0,0 +1,18 @@
+diff -up ./fs/utimes.c.touchkludge ./fs/utimes.c
+--- ./fs/utimes.c.touchkludge 2008-08-20 20:54:10.000000000 +0400
++++ ./fs/utimes.c 2008-08-20 21:07:40.000000000 +0400
+@@ -14,6 +14,14 @@ asmlinkage long sys_utimensat(int dfd, c
+ {
+ struct timespec tstimes[2];
+ struct timeval time[2];
++
++ if (filename == NULL)
++ /*
++ * a kludge for thuse, checking for utimensat
++ * availability via this maneuver
++ */
++ return -ENOSYS;
++
+ if (utimes) {
+ if (copy_from_user(&tstimes, utimes, sizeof(tstimes)))
+ return -EFAULT;
diff --git a/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.053.14.ebuild b/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.056.1.ebuild
index b736ee743e73..a9d427ea839f 100644
--- a/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.053.14.ebuild
+++ b/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.056.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.053.14.ebuild,v 1.1 2008/06/06 05:39:33 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.056.1.ebuild,v 1.1 2008/09/24 09:32:55 pva Exp $
inherit versionator
@@ -27,11 +27,13 @@ IUSE=""
DESCRIPTION="Full sources including OpenVZ patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
HOMEPAGE="http://www.openvz.org"
SRC_URI="${KERNEL_URI} ${ARCH_URI}
- http://download.openvz.org/kernel/branches/rhel5-${CKV}/${OVZ_KERNEL}.${OVZ_REV}/patches/patch-53.1.19.el5.${OVZ_KERNEL}.${OVZ_REV}-combined.gz"
+ http://download.openvz.org/kernel/branches/${CKV}/${OVZ_KERNEL}.${OVZ_REV}/patches/patch-ovz${OVZ_KERNEL}.${OVZ_REV}-combined.gz"
UNIPATCH_STRICTORDER=1
-UNIPATCH_LIST="${DISTDIR}/patch-53.1.19.el5.${OVZ_KERNEL}.${OVZ_REV}-combined.gz"
-
-K_EXTRAEINFO="Starting with openvz-sources-2.6.18.028.053.14 we use RHEL5 patchset
-instead of previously used 2.6.18 one. This patchset considered to be more stable
-and security supported by upstream, that why they suggested us to use it."
+UNIPATCH_LIST="${DISTDIR}/patch-ovz${OVZ_KERNEL}.${OVZ_REV}-combined.gz
+${FILESDIR}/${P}-utimensat.patch
+${FILESDIR}/openvz-sources-2.6.18.028.057.2-qouta-compat-build.patch
+${FILESDIR}/openvz-sources-2.6.18.028.057.2-fix-CIFS-build.patch
+${FILESDIR}/openvz-sources-2.6.18.028.057.2-missed-PATH_MAX-sumversion.c.patch
+${FILESDIR}/openvz-sources-2.6.18.028.057.2-prevent-gcc-smartness.patch
+${FILESDIR}/${P}-3ware.patch"
diff --git a/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.057.2.ebuild b/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.057.2.ebuild
index 4fab14b9da44..eb47454a2ceb 100644
--- a/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.057.2.ebuild
+++ b/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.057.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.057.2.ebuild,v 1.1 2008/08/22 19:39:27 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/openvz-sources/openvz-sources-2.6.18.028.057.2.ebuild,v 1.2 2008/09/24 09:32:55 pva Exp $
inherit versionator
@@ -39,9 +39,9 @@ ${FILESDIR}/${P}-prevent-gcc-smartness.patch
${FILESDIR}/${P}-fix-CIFS-build.patch
${FILESDIR}/${P}-another-fix-build-xfrm.h.patch"
-K_EXTRAEINFO="Starting with openvz-sources-2.6.18.028.053.14 we use RHEL5 patchset
-instead of previously used 2.6.18 one. This patchset considered to be more stable
-and security supported by upstream, that why they suggested us to use it.
-But note: RHEL5 patchset is very fragile and fails to build in many
-configurations so if you have problems use config files from openvz team
+K_EXTRAEINFO="This openvz kernel uses RHEL5 patchset instead of vanilla kernel.
+This patchset considered to be more stable and security supported by upstream,
+that why they suggested us to use it. But note: RHEL5 patchset is very fragile
+and fails to build in many configurations so if you have problems use config
+files from openvz team
http://wiki.openvz.org/Download/kernel/rhel5/028stab057.2"