[PATCH] aacraid: Add likely() and unlikely() Take 2
Thanks Arjan for the comments, much appreciated. I have removed the superfluous braces and limited the usage of the likely and unlikely to runtime code. Sorry for the delay, took a four day vacation ... Add some likely() and unlikely() compiler hints in some of the aacraid hardware interface layers. There should be no operational side effects resulting from this patch and the changes should be mostly benign on x86 platforms. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patches attachments. This attached patch is against current scsi-misc-2.6 Signed-off-by: Mark Salyzyn <[EMAIL PROTECTED]> --- Sincerely -- Mark Salyzyn > -Original Message- > From: Arjan van de Ven [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 22, 2007 5:24 AM > To: Salyzyn, Mark > Cc: linux-scsi > Subject: Re: [PATCH] aacraid: Add likely() and unlikely() > > On Wed, 2007-03-21 at 15:43 -0400, Salyzyn, Mark wrote: > > - if((fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)){ > + if(unlikely(fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)){ > return -ETIMEDOUT; > } else { > return 0; > > while you're at it, please remove the extra {}'s as well > > (I assume you're aware that likely/unlikely should only be used for 99:1 or higher ratios, this one looks correct for sure) > > Also I suggest you don't add about half of these; they appear init time only code, at which point adding likely/unlikely is just code noise that clutters the driver... aacraid_likely_unlikely_2.patch Description: aacraid_likely_unlikely_2.patch
Re: [PATCH] PCMCIA: Allow PCMCIA SCSI drivers to be built into the kernel.
On 3/25/2007 7:59 PM, Robert P. J. Day wrote: > Remove the Kconfig requirement that the PCMCIA SCSI drivers be built > only as modules, and allow them to be built into the kernel. > > Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> > > --- > > i imagine there's a historical reason for these drivers being forced > to be built only as modules. (I don't know. Maybe hot-ejection or re-insertion is broken?) > and i'm not sure whether i should have > CCed the SCSI folks, the PCMCIA folks, or both. or whatever. I'd say, if in doubt send to both of these, instead of LKML. > compile-tested on x86 with "make allyesconfig". > > diff --git a/drivers/scsi/pcmcia/Kconfig b/drivers/scsi/pcmcia/Kconfig > index eac8e17..7dd787f 100644 > --- a/drivers/scsi/pcmcia/Kconfig > +++ b/drivers/scsi/pcmcia/Kconfig > @@ -3,11 +3,11 @@ > # > > menu "PCMCIA SCSI adapter support" > - depends on SCSI!=n && PCMCIA!=n && MODULES > + depends on SCSI!=n && PCMCIA!=n > > config PCMCIA_AHA152X > tristate "Adaptec AHA152X PCMCIA support" > - depends on m && !64BIT > + depends on !64BIT > select SCSI_SPI_ATTRS > help > Say Y here if you intend to attach this type of PCMCIA SCSI host > @@ -18,7 +18,6 @@ config PCMCIA_AHA152X > > config PCMCIA_FDOMAIN > tristate "Future Domain PCMCIA support" > - depends on m > help > Say Y here if you intend to attach this type of PCMCIA SCSI host > adapter to your computer. > @@ -28,7 +27,7 @@ config PCMCIA_FDOMAIN > > config PCMCIA_NINJA_SCSI > tristate "NinjaSCSI-3 / NinjaSCSI-32Bi (16bit) PCMCIA support" > - depends on m && !64BIT > + depends on !64BIT > help > If you intend to attach this type of PCMCIA SCSI host adapter to > your computer, say Y here and read > @@ -62,7 +61,6 @@ config PCMCIA_NINJA_SCSI > > config PCMCIA_QLOGIC > tristate "Qlogic PCMCIA support" > - depends on m > help > Say Y here if you intend to attach this type of PCMCIA SCSI host > adapter to your computer. > @@ -72,7 +70,6 @@ config PCMCIA_QLOGIC > > config PCMCIA_SYM53C500 > tristate "Symbios 53c500 PCMCIA support" > - depends on m > help > Say Y here if you have a New Media Bus Toaster or other PCMCIA > SCSI adapter based on the Symbios 53c500 controller. -- Stefan Richter -=-=-=== --== ==-=- http://arcgraph.de/sr/ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: some PCMCIA SCSI drivers can be built *only* as modules
Robert P. J. Day wrote at LKML: > drivers/scsi/pcmcia/Kconfig: > ... > config PCMCIA_AHA152X > tristate "Adaptec AHA152X PCMCIA support" > depends on m && !64BIT > select SCSI_SPI_ATTRS > help > Say Y here if you intend to attach this type of PCMCIA SCSI host > adapter to your computer. > > To compile this driver as a module, choose M here: the > module will be called aha152x_cs. > ... > > it would seem to make no sense that the "depends on" clause for this > option includes "m", forcing this (and all other four entries in that > Kconfig file, by the way) to be built as modules, while the help text > for all five entries suggests you can select "y". > > as jack nicholson would say, something's gotta give. LSML a.k.a. linux-scsi may know what's gotta give. -- Stefan Richter -=-=-=== --== ==-=- http://arcgraph.de/sr/ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Disabling block layer
Hello! I had a question about disabling the block layer for SCSI devices. We have an embedded device, and it runs 2.4.30. We need to be able to support a lot of SCSI devices (in the thousands) for our device, and we talk to the devices via SG. We are facing a memory allocation problem after discovering a few thousand devices. For every device, there seems to be a lot of memory allocated in the block layer. This memory includes cache memory (which IIRC is reclaimable by the kernel memory subsystem when it needs it) and also pages that are used for the alloc_pages pool. My questions were relating to disabling the block layer for the devices. We always talk direct passthrough to the storage(except the local hard disk), and do not need the block layer at all. 1. Is there a way to disable the block layer for specific devices? 2. If yes, how can that be done, and are there any gotchas associated with that? Thanks! M Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: some PCMCIA SCSI drivers can be built *only* as modules
On Mon, 26 Mar 2007, Christoph Hellwig wrote: > > > it would seem to make no sense that the "depends on" clause > > > for this option includes "m", forcing this (and all other four > > > entries in that Kconfig file, by the way) to be built as > > > modules, while the help text for all five entries suggests you > > > can select "y". > > In the old days pcmcia drivers had to be modular because pcmcia > required a lot of userspace setup. It's not needed anymore these > days and the dependencies can go. i'd suspected something along those lines, which is why i submitted the patch below to the LKML just a while ago. if anyone wants to pick it up and apply it somewhere, feel free. (i dropped the LKML from the CC list, i don't think they need to see any more of this.) diff --git a/drivers/scsi/pcmcia/Kconfig b/drivers/scsi/pcmcia/Kconfig index eac8e17..7dd787f 100644 --- a/drivers/scsi/pcmcia/Kconfig +++ b/drivers/scsi/pcmcia/Kconfig @@ -3,11 +3,11 @@ # menu "PCMCIA SCSI adapter support" - depends on SCSI!=n && PCMCIA!=n && MODULES + depends on SCSI!=n && PCMCIA!=n config PCMCIA_AHA152X tristate "Adaptec AHA152X PCMCIA support" - depends on m && !64BIT + depends on !64BIT select SCSI_SPI_ATTRS help Say Y here if you intend to attach this type of PCMCIA SCSI host @@ -18,7 +18,6 @@ config PCMCIA_AHA152X config PCMCIA_FDOMAIN tristate "Future Domain PCMCIA support" - depends on m help Say Y here if you intend to attach this type of PCMCIA SCSI host adapter to your computer. @@ -28,7 +27,7 @@ config PCMCIA_FDOMAIN config PCMCIA_NINJA_SCSI tristate "NinjaSCSI-3 / NinjaSCSI-32Bi (16bit) PCMCIA support" - depends on m && !64BIT + depends on !64BIT help If you intend to attach this type of PCMCIA SCSI host adapter to your computer, say Y here and read @@ -62,7 +61,6 @@ config PCMCIA_NINJA_SCSI config PCMCIA_QLOGIC tristate "Qlogic PCMCIA support" - depends on m help Say Y here if you intend to attach this type of PCMCIA SCSI host adapter to your computer. @@ -72,7 +70,6 @@ config PCMCIA_QLOGIC config PCMCIA_SYM53C500 tristate "Symbios 53c500 PCMCIA support" - depends on m help Say Y here if you have a New Media Bus Toaster or other PCMCIA SCSI adapter based on the Symbios 53c500 controller. - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: some PCMCIA SCSI drivers can be built *only* as modules
On 26 Mar, Robert P. J. Day wrote: > On Mon, 26 Mar 2007, Christoph Hellwig wrote: >> In the old days pcmcia drivers had to be modular because pcmcia >> required a lot of userspace setup. It's not needed anymore these >> days and the dependencies can go. > > i'd suspected something along those lines, which is why i submitted > the patch below to the LKML just a while ago. if anyone wants to pick > it up and apply it somewhere, feel free. James, maybe you want to take it since it's for drivers/scsi/pcmcia/Kconfig. Date: Sun, 25 Mar 2007 13:59:36 -0400 (EDT) From: "Robert P. J. Day" <[EMAIL PROTECTED]> Subject: [PATCH] PCMCIA: Allow PCMCIA SCSI drivers to be built into the kernel. Remove the Kconfig requirement that the PCMCIA SCSI drivers be built only as modules, and allow them to be built into the kernel. Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> --- i imagine there's a historical reason for these drivers being forced to be built only as modules. and i'm not sure whether i should have CCed the SCSI folks, the PCMCIA folks, or both. or whatever. compile-tested on x86 with "make allyesconfig". diff --git a/drivers/scsi/pcmcia/Kconfig b/drivers/scsi/pcmcia/Kconfig index eac8e17..7dd787f 100644 --- a/drivers/scsi/pcmcia/Kconfig +++ b/drivers/scsi/pcmcia/Kconfig @@ -3,11 +3,11 @@ # menu "PCMCIA SCSI adapter support" - depends on SCSI!=n && PCMCIA!=n && MODULES + depends on SCSI!=n && PCMCIA!=n config PCMCIA_AHA152X tristate "Adaptec AHA152X PCMCIA support" - depends on m && !64BIT + depends on !64BIT select SCSI_SPI_ATTRS help Say Y here if you intend to attach this type of PCMCIA SCSI host @@ -18,7 +18,6 @@ config PCMCIA_AHA152X config PCMCIA_FDOMAIN tristate "Future Domain PCMCIA support" - depends on m help Say Y here if you intend to attach this type of PCMCIA SCSI host adapter to your computer. @@ -28,7 +27,7 @@ config PCMCIA_FDOMAIN config PCMCIA_NINJA_SCSI tristate "NinjaSCSI-3 / NinjaSCSI-32Bi (16bit) PCMCIA support" - depends on m && !64BIT + depends on !64BIT help If you intend to attach this type of PCMCIA SCSI host adapter to your computer, say Y here and read @@ -62,7 +61,6 @@ config PCMCIA_NINJA_SCSI config PCMCIA_QLOGIC tristate "Qlogic PCMCIA support" - depends on m help Say Y here if you intend to attach this type of PCMCIA SCSI host adapter to your computer. @@ -72,7 +70,6 @@ config PCMCIA_QLOGIC config PCMCIA_SYM53C500 tristate "Symbios 53c500 PCMCIA support" - depends on m help Say Y here if you have a New Media Bus Toaster or other PCMCIA SCSI adapter based on the Symbios 53c500 controller. - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Disabling block layer
Mark Lobo wrote: > Hello! > > I had a question about disabling the block layer for SCSI devices. We > have an embedded device, and it runs 2.4.30. We need to be able to > support a lot of SCSI devices (in the thousands) for our device, and we > talk to the devices via SG. We are facing a memory allocation problem > after discovering a few thousand devices. For every device, there > seems to be a lot of memory allocated in the block layer. This memory > includes cache memory (which IIRC is reclaimable by the kernel memory > subsystem when it needs it) and also pages that are used for the > alloc_pages pool. > > > > My questions were relating to disabling the block layer for the > devices. We always talk direct passthrough to the storage(except the > local hard disk), and do not need the block layer at all. > > 1. Is there a way to disable the block layer for specific devices? > > 2. If yes, how can that be done, and are there any gotchas associated with > that? Mark, Tempting thought that: linux without a block layer. I think you have no hope in the lk 2.4 series and even less in the lk 2.6 series. Now for some thoughts. If you don't need to mount any SCSI disks, you could build a kernel with sd as a module and remove/hide sd_mod.o . A more invasive method would be to modify the sd driver so that it was no longer interested in SCSI devices whose peripheral device type was zero (i.e. disks). On the sg driver side, if lots of sg file descriptors are open to those thousands of SCSI devices, then reducing the per fd SG_DEF_RESERVED_SIZE from 32 KB may help. This could be reduced by editing include/scsi/sg.h . Doug Gilbert - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Disabling block layer
On Mon, 2007-03-26 at 17:23 -0400, Douglas Gilbert wrote: > Mark Lobo wrote: > > I had a question about disabling the block layer for SCSI devices. We > > have an embedded device, and it runs 2.4.30. We need to be able to > > support a lot of SCSI devices (in the thousands) for our device, and we > > talk to the devices via SG. We are facing a memory allocation problem > > after discovering a few thousand devices. For every device, there > > seems to be a lot of memory allocated in the block layer. This memory > > includes cache memory (which IIRC is reclaimable by the kernel memory > > subsystem when it needs it) and also pages that are used for the > > alloc_pages pool. > > > > > > > > My questions were relating to disabling the block layer for the > > devices. We always talk direct passthrough to the storage(except the > > local hard disk), and do not need the block layer at all. > > > > 1. Is there a way to disable the block layer for specific devices? > > > > 2. If yes, how can that be done, and are there any gotchas associated with > > that? > > Mark, > Tempting thought that: linux without a block layer. > I think you have no hope in the lk 2.4 series and > even less in the lk 2.6 series. > > Now for some thoughts. If you don't need to mount any > SCSI disks, you could build a kernel with sd as a > module and remove/hide sd_mod.o . A more invasive method > would be to modify the sd driver so that it was no > longer interested in SCSI devices whose peripheral > device type was zero (i.e. disks). > > On the sg driver side, if lots of sg file descriptors > are open to those thousands of SCSI devices, then > reducing the per fd SG_DEF_RESERVED_SIZE from 32 KB > may help. This could be reduced by editing > include/scsi/sg.h . If it's just a question of tearing down all the resources for a given device, wasn't scsi remove-single-device > /proc/scsi/scsi The accepted way of doing it, even in 2.4? James - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Bugme-new] [Bug 8266] New: Exabyte 1x10 autoloader breaks on upgrade
On Mon, 26 Mar 2007 14:50:51 -0700 [EMAIL PROTECTED] wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=8266 > >Summary: Exabyte 1x10 autoloader breaks on upgrade > Kernel Version: 2.6.20.4 > Status: NEW > Severity: high > Owner: [EMAIL PROTECTED] > Submitter: [EMAIL PROTECTED] > > > Most recent kernel where this bug did *NOT* occur: 2.6.20.3 > Distribution: debian/stable/sarge > Hardware Environment: amd64 > Software Environment: amanda > Problem Description: > When upgrading from 2.6.20.3 to 2.6.20.4, the Exabyte 1x10 autoloader would be > work anymore. I am using the aic79xx old driver because the aic79xx new > driver > had already broken (see my previous bugs 5268 and 7616) > > Steps to reproduce: > upgrade from 2.6.20.3 to 2.6.20.4 We appear to have a regression in the stable kernel. Probably, that regression is in 2.6.21-rc5 as well. - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Bugme-new] [Bug 8266] New: Exabyte 1x10 autoloader breaks on upgrade
On Mon, Mar 26, 2007 at 03:33:46PM -0700, Andrew Morton wrote: > On Mon, 26 Mar 2007 14:50:51 -0700 > [EMAIL PROTECTED] wrote: > > > http://bugzilla.kernel.org/show_bug.cgi?id=8266 > > > >Summary: Exabyte 1x10 autoloader breaks on upgrade > > Kernel Version: 2.6.20.4 > > Status: NEW > > Severity: high > > Owner: [EMAIL PROTECTED] > > Submitter: [EMAIL PROTECTED] > > > > > > Most recent kernel where this bug did *NOT* occur: 2.6.20.3 > > Distribution: debian/stable/sarge > > Hardware Environment: amd64 > > Software Environment: amanda > > Problem Description: > > When upgrading from 2.6.20.3 to 2.6.20.4, the Exabyte 1x10 autoloader would > > be > > work anymore. I am using the aic79xx old driver because the aic79xx new > > driver > > had already broken (see my previous bugs 5268 and 7616) > > > > Steps to reproduce: > > upgrade from 2.6.20.3 to 2.6.20.4 > > We appear to have a regression in the stable kernel. > > Probably, that regression is in 2.6.21-rc5 as well. Please attach the dmesg's of both 2.6.20.3 and 2.6.20.4 in Bugzilla. Does reverting the attached patch fix it? cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed >From [EMAIL PROTECTED] Tue Mar 13 11:05:30 2007 From: Jan Beulich <[EMAIL PROTECTED]> Date: Tue, 13 Mar 2007 14:04:11 -0400 Subject: adjust legacy IDE resource setting (v2) To: linux-stable <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> From: Jan Beulich <[EMAIL PROTECTED]> adjust legacy IDE resource setting (v2) The change to force legacy mode IDE channels' resources to fixed non-zero values confuses (at least some versions of) X, because the values reported by the kernel and those readable from PCI config space aren't consistent anymore. Therefore, this patch arranges for the respective BARs to also get updated if possible. Signed-off-by: Jan Beulich <[EMAIL PROTECTED]> Acked-by: Alan Cox <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> Cc: Chuck Ebbert <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- drivers/pci/probe.c | 45 - 1 file changed, 32 insertions(+), 13 deletions(-) --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -639,7 +639,34 @@ static void pci_read_irq(struct pci_dev dev->irq = irq; } -#define LEGACY_IO_RESOURCE (IORESOURCE_IO | IORESOURCE_PCI_FIXED) +static void change_legacy_io_resource(struct pci_dev * dev, unsigned index, + unsigned start, unsigned end) +{ + unsigned base = start & PCI_BASE_ADDRESS_IO_MASK; + unsigned len = (end | ~PCI_BASE_ADDRESS_IO_MASK) - base + 1; + + /* + * Some X versions get confused when the BARs reported through + * /sys or /proc differ from those seen in config space, thus + * try to update the config space values, too. + */ + if (!(pci_resource_flags(dev, index) & IORESOURCE_IO)) + printk(KERN_WARNING "%s: cannot adjust BAR%u (not I/O)\n", + pci_name(dev), index); + else if (pci_resource_len(dev, index) != len) + printk(KERN_WARNING "%s: cannot adjust BAR%u (size %04X)\n", + pci_name(dev), index, (unsigned)pci_resource_len(dev, index)); + else { + printk(KERN_INFO "%s: trying to change BAR%u from %04X to %04X\n", + pci_name(dev), index, + (unsigned)pci_resource_start(dev, index), base); + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + index * 4, base); + } + pci_resource_start(dev, index) = start; + pci_resource_end(dev, index) = end; + pci_resource_flags(dev, index) = + IORESOURCE_IO | IORESOURCE_PCI_FIXED | PCI_BASE_ADDRESS_SPACE_IO; +} /** * pci_setup_device - fill in class and map information of a device @@ -692,20 +719,12 @@ static int pci_setup_device(struct pci_d u8 progif; pci_read_config_byte(dev, PCI_CLASS_PROG, &progif); if ((progif & 1) == 0) { -dev->resource[0].start = 0x1F0; -dev->resource[0].end = 0x1F7; -dev->resource[0].flags = LEGACY_IO_RESOURCE; -dev->resource[1].start = 0x3F6; -dev->resource[1].end = 0x3F6; -dev->resource[1].flags = LEGACY_IO_RESOURCE; +change_legacy_io_resource(dev, 0, 0x1F0, 0x1F7); +change_legacy_io_resource(dev, 1, 0x3F6, 0x3F6); } if ((progif & 4) == 0) { -dev->resource[2].start = 0x170; -dev->resource[2].end = 0x177; -dev->resource[2].flags = LEGACY_IO_RESOURCE; -dev->resource[3].start = 0x376; -dev->resource[3].end = 0x376; -dev->resource[3].flags = LEGACY_IO_RESOURCE; +change_legacy_io_resource(dev, 2, 0x170, 0x177); +change_legacy_io_resource(dev, 3, 0x376, 0x376); } } break;
Re: Disabling block layer
Mark Lobo wrote: > I had a question about disabling the block layer for SCSI devices. We > have an embedded device, and it runs 2.4.30. We need to be able to > support a lot of SCSI devices (in the thousands) for our device, and we > talk to the devices via SG. We are facing a memory allocation problem > after discovering a few thousand devices. For every device, there > seems to be a lot of memory allocated in the block layer. This memory > includes cache memory (which IIRC is reclaimable by the kernel memory > subsystem when it needs it) and also pages that are used for the > alloc_pages pool. > > My questions were relating to disabling the block layer for the > devices. We always talk direct passthrough to the storage(except the > local hard disk), and do not need the block layer at all. You may consider something we experimented with here (for performance reasons).. We basically recompiled one of the scsi drivers to call our own version of scsi_host_alloc() and then made calls to the queuecommand() routine directly. You then allow the kernel probe routines to only discover the first target with the local disk. I assume you know ahead of time which scsi cards your using in your system. The point is that you could just build a heavily modified scsi driver with application specific hooks. BTW we aren't currently doing this because in the end we got most of what we needed by writing a driver which replaces sg and bypasses most of the kernel without being as invasive. In the long run we may still use a modified LLDD since the interfaces we depend on are changing a little to fast for our liking and we are not running any system devices on the interface cards we need to directly access. I'm not sure how you would go about tearing down enough of the system that the device doesn't consume any resources, yet leave enough of it around to be accessible. I will be interested to find out what you end up doing. - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: some PCMCIA SCSI drivers can be built *only* as modules
> > it would seem to make no sense that the "depends on" clause for this > > option includes "m", forcing this (and all other four entries in that > > Kconfig file, by the way) to be built as modules, while the help text > > for all five entries suggests you can select "y". In the old days pcmcia drivers had to be modular because pcmcia required a lot of userspace setup. It's not needed anymore these days and the dependencies can go. - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: some PCMCIA SCSI drivers can be built *only* as modules
On Mon, 2007-03-26 at 21:02 +0100, Christoph Hellwig wrote: > > > it would seem to make no sense that the "depends on" clause for this > > > option includes "m", forcing this (and all other four entries in that > > > Kconfig file, by the way) to be built as modules, while the help text > > > for all five entries suggests you can select "y". > > In the old days pcmcia drivers had to be modular because pcmcia required > a lot of userspace setup. It's not needed anymore these days and the > dependencies can go. I agree the non-legacy (CardBus and beyond) ones can be built in. I thought the legacy 8 and 16 bit type I and II still had to be modular because they still need setting up. James - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: some PCMCIA SCSI drivers can be built *only* as modules
On Mon, Mar 26, 2007 at 03:35:47PM -0500, James Bottomley wrote: > I agree the non-legacy (CardBus and beyond) ones can be built in. I > thought the legacy 8 and 16 bit type I and II still had to be modular > because they still need setting up. nope. While I don't have a pcmcia scsi card my 16 bit pcmcia wireless cards work perfectly fine without any previous setup. - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: some PCMCIA SCSI drivers can be built *only* as modules
On Mon, 2007-03-26 at 21:38 +0100, Christoph Hellwig wrote: > On Mon, Mar 26, 2007 at 03:35:47PM -0500, James Bottomley wrote: > > I agree the non-legacy (CardBus and beyond) ones can be built in. I > > thought the legacy 8 and 16 bit type I and II still had to be modular > > because they still need setting up. > > nope. While I don't have a pcmcia scsi card my 16 bit pcmcia wireless > cards work perfectly fine without any previous setup. OK ... I had the opposite experience ... A ZoomAir 802.11b card wasn't working because I'd accidentally config'd it non-modular. However, if Dominik confirms it's all supposed to work non-modular, I'm happy to conclude my experience was pilot error. James - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 04/28] scsi: remove unnecessary check in drivers/scsi/sg.c
From: Eric Sesterhenn <[EMAIL PROTECTED]> coverity spotted this (cid #758). All callers dereference sfp, so we dont need this check. In addition to this, we dereference it earlier in the function. Signed-off-by: Eric Sesterhenn <[EMAIL PROTECTED]> Cc: Douglas Gilbert <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/sg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/scsi/sg.c~remove-unnecessary-check-in-drivers-scsi-sgc drivers/scsi/sg.c --- a/drivers/scsi/sg.c~remove-unnecessary-check-in-drivers-scsi-sgc +++ a/drivers/scsi/sg.c @@ -1837,7 +1837,7 @@ sg_build_indirect(Sg_scatter_hold * schp int blk_size = buff_size; struct page *p = NULL; - if ((blk_size < 0) || (!sfp)) + if (blk_size < 0) return -EFAULT; if (0 == blk_size) ++blk_size; /* don't know why */ _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 09/28] scsi: whitespace cleanup in the dpt driver
From: Henne <[EMAIL PROTECTED]> Remove some trailing whitespaces and some replace whitespaces with tabs. Signed-off-by: Henrik Kretzschmar <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/dpt/dpti_i2o.h | 48 drivers/scsi/dpt/dpti_ioctl.h |2 - drivers/scsi/dpt/dptsig.h |4 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff -puN drivers/scsi/dpt/dpti_i2o.h~scsi-whitespace-cleanup-in-the-dpt-driver drivers/scsi/dpt/dpti_i2o.h --- a/drivers/scsi/dpt/dpti_i2o.h~scsi-whitespace-cleanup-in-the-dpt-driver +++ a/drivers/scsi/dpt/dpti_i2o.h @@ -31,7 +31,7 @@ * Tunable parameters first */ -/* How many different OSM's are we allowing */ +/* How many different OSM's are we allowing */ #define MAX_I2O_MODULES64 #define I2O_EVT_CAPABILITY_OTHER 0x01 @@ -63,7 +63,7 @@ struct i2o_message u16 size; u32 target_tid:12; u32 init_tid:12; - u32 function:8; + u32 function:8; u32 initiator_context; /* List follows */ }; @@ -77,7 +77,7 @@ struct i2o_device char dev_name[8]; /* linux /dev name if available */ i2o_lct_entry lct_data;/* Device LCT information */ - u32 flags; + u32 flags; struct proc_dir_entry* proc_entry; /* /proc dir */ struct adpt_device *owner; struct _adpt_hba *controller; /* Controlling IOP */ @@ -86,7 +86,7 @@ struct i2o_device /* * Each I2O controller has one of these objects */ - + struct i2o_controller { char name[16]; @@ -111,9 +111,9 @@ struct i2o_sys_tbl_entry u32 iop_id:12; u32 reserved2:20; u16 seg_num:12; - u16 i2o_version:4; - u8 iop_state; - u8 msg_type; + u16 i2o_version:4; + u8 iop_state; + u8 msg_type; u16 frame_size; u16 reserved3; u32 last_changed; @@ -124,14 +124,14 @@ struct i2o_sys_tbl_entry struct i2o_sys_tbl { - u8 num_entries; - u8 version; - u16 reserved1; + u8 num_entries; + u8 version; + u16 reserved1; u32 change_ind; u32 reserved2; u32 reserved3; struct i2o_sys_tbl_entry iops[0]; -}; +}; /* * I2O classes / subclasses @@ -146,7 +146,7 @@ struct i2o_sys_tbl /* Class code names * (from v1.5 Table 6-1 Class Code Assignments.) */ - + #defineI2O_CLASS_EXECUTIVE 0x000 #defineI2O_CLASS_DDM 0x001 #defineI2O_CLASS_RANDOM_BLOCK_STORAGE 0x010 @@ -166,7 +166,7 @@ struct i2o_sys_tbl /* Rest of 0x092 - 0x09f reserved for peer-to-peer classes */ - + #defineI2O_CLASS_MATCH_ANYCLASS0x /* Subclasses @@ -175,7 +175,7 @@ struct i2o_sys_tbl #defineI2O_SUBCLASS_i960 0x001 #defineI2O_SUBCLASS_HDM0x020 #defineI2O_SUBCLASS_ISM0x021 - + /* Operation functions */ #define I2O_PARAMS_FIELD_GET 0x0001 @@ -219,7 +219,7 @@ struct i2o_sys_tbl /* * Messaging API values */ - + #defineI2O_CMD_ADAPTER_ASSIGN 0xB3 #defineI2O_CMD_ADAPTER_READ0xB2 #defineI2O_CMD_ADAPTER_RELEASE 0xB5 @@ -284,16 +284,16 @@ struct i2o_sys_tbl #define I2O_PRIVATE_MSG0xFF /* - * Init Outbound Q status + * Init Outbound Q status */ - + #define I2O_CMD_OUTBOUND_INIT_IN_PROGRESS 0x01 #define I2O_CMD_OUTBOUND_INIT_REJECTED 0x02 #define I2O_CMD_OUTBOUND_INIT_FAILED 0x03 #define I2O_CMD_OUTBOUND_INIT_COMPLETE 0x04 /* - * I2O Get Status State values + * I2O Get Status State values */ #defineADAPTER_STATE_INITIALIZING 0x01 @@ -303,7 +303,7 @@ struct i2o_sys_tbl #defineADAPTER_STATE_OPERATIONAL 0x08 #defineADAPTER_STATE_FAILED0x10 #defineADAPTER_STATE_FAULTED 0x11 - + /* I2O API function return values */ #define I2O_RTN_NO_ERROR 0 @@ -321,9 +321,9 @@ struct i2o_sys_tbl /* Reply message status defines for all messages */ -#define I2O_REPLY_STATUS_SUCCESS 0x00 -#define I2O_REPLY_STATUS_ABORT_DIRTY 0x01 -#define I2O_REPLY_STATUS_ABORT_NO_DATA_TRANSFER0x02 +#define I2O_REPLY_STATUS_SUCCESS 0x00 +#define I2O_REPLY_STATUS_ABORT_DIRTY 0x01 +#define I2O_REPLY_STATUS_ABORT_NO_DATA_TRANSFER0x02 #defineI2O_REPLY_STATUS_ABORT_PARTIAL_TRANSFER 0x03 #defineI2O_REPLY_STATUS_ERROR_DIRTY0x04 #defineI2O_REP
[patch 14/28] scsi: cover up bugs^W^W^WFix up compiler warnings in megaraid driver
From: Martin Bligh <[EMAIL PROTECTED]> Fix up compiler warnings in megaraid driver [EMAIL PROTECTED]: build fix] Signed-off-by: Martin J. Bligh <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/megaraid.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff -puN drivers/scsi/megaraid.c~scsi-cover-up-bugs-fix-up-compiler-warnings-in-megaraid-driver drivers/scsi/megaraid.c --- a/drivers/scsi/megaraid.c~scsi-cover-up-bugs-fix-up-compiler-warnings-in-megaraid-driver +++ a/drivers/scsi/megaraid.c @@ -73,10 +73,14 @@ static unsigned short int max_mbox_busy_ module_param(max_mbox_busy_wait, ushort, 0); MODULE_PARM_DESC(max_mbox_busy_wait, "Maximum wait for mailbox in microseconds if busy (default=MBOX_BUSY_WAIT=10)"); -#define RDINDOOR(adapter) readl((adapter)->mmio_base + 0x20) -#define RDOUTDOOR(adapter) readl((adapter)->mmio_base + 0x2C) -#define WRINDOOR(adapter,value) writel(value, (adapter)->mmio_base + 0x20) -#define WROUTDOOR(adapter,value) writel(value, (adapter)->mmio_base + 0x2C) +#define RDINDOOR(adapter) readl((volatile void __iomem *) \ + (adapter)->base + 0x20) +#define RDOUTDOOR(adapter) readl((volatile void __iomem *) \ + (adapter)->base + 0x2C) +#define WRINDOOR(adapter,value)writel(value, (volatile void __iomem *)\ + (adapter)->base + 0x20) +#define WROUTDOOR(adapter,value) writel(value, (volatile void __iomem *)\ + (adapter)->base + 0x2C) /* * Global variables @@ -3571,7 +3575,7 @@ megadev_ioctl(struct inode *inode, struc /* * The user passthru structure */ - upthru = (mega_passthru __user *)MBOX(uioc)->xferaddr; + upthru = (mega_passthru __user *)(unsigned long)MBOX(uioc)->xferaddr; /* * Copy in the user passthru here. @@ -3623,7 +3627,7 @@ megadev_ioctl(struct inode *inode, struc /* * Get the user data */ - if( copy_from_user(data, (char __user *)uxferaddr, + if( copy_from_user(data, (char __user *)(unsigned long) uxferaddr, pthru->dataxferlen) ) { rval = (-EFAULT); goto freemem_and_return; @@ -3649,7 +3653,7 @@ megadev_ioctl(struct inode *inode, struc * Is data going up-stream */ if( pthru->dataxferlen && (uioc.flags & UIOC_RD) ) { - if( copy_to_user((char __user *)uxferaddr, data, + if( copy_to_user((char __user *)(unsigned long) uxferaddr, data, pthru->dataxferlen) ) { rval = (-EFAULT); } @@ -3702,7 +3706,7 @@ freemem_and_return: /* * Get the user data */ - if( copy_from_user(data, (char __user *)uxferaddr, + if( copy_from_user(data, (char __user *)(unsigned long) uxferaddr, uioc.xferlen) ) { pci_free_consistent(pdev, @@ -3742,7 +3746,7 @@ freemem_and_return: * Is data going up-stream */ if( uioc.xferlen && (uioc.flags & UIOC_RD) ) { - if( copy_to_user((char __user *)uxferaddr, data, + if( copy_to_user((char __user *)(unsigned long) uxferaddr, data, uioc.xferlen) ) { rval = (-EFAULT); _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 08/28] drivers/scsi/megaraid.c: Replacing yield() with a better alternative
From: Amol Lad <[EMAIL PROTECTED]> For this driver cond_resched() seems to be a better alternative Signed-off-by: Amol Lad <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/megaraid.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/scsi/megaraid.c~drivers-scsi-megaraidc-replacing-yield-with-a drivers/scsi/megaraid.c --- a/drivers/scsi/megaraid.c~drivers-scsi-megaraidc-replacing-yield-with-a +++ a/drivers/scsi/megaraid.c @@ -1754,7 +1754,8 @@ __mega_busywait_mbox (adapter_t *adapter for (counter = 0; counter < 1; counter++) { if (!mbox->m_in.busy) return 0; - udelay(100); yield(); + udelay(100); + cond_resched(); } return -1; /* give up after 1 second */ } _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 18/28] SCSI: Fix obvious typo "spin_lock_irqrestore()" in gdth.c
From: "Robert P. J. Day" <[EMAIL PROTECTED]> Fix misspelled "spin_lock_irqrestore" to read "spin_unlock_irqrestore" instead. Presumably, GDTH_RTC doesn't get used a lot. Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/gdth.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/scsi/gdth.c~scsi-fix-obvious-typo-spin_lock_irqrestore-in-gdthc drivers/scsi/gdth.c --- a/drivers/scsi/gdth.c~scsi-fix-obvious-typo-spin_lock_irqrestore-in-gdthc +++ a/drivers/scsi/gdth.c @@ -1955,7 +1955,7 @@ static int __init gdth_search_drives(int for (j = 0; j < 12; ++j) rtc[j] = CMOS_READ(j); } while (rtc[0] != CMOS_READ(0)); -spin_lock_irqrestore(&rtc_lock, flags); +spin_unlock_irqrestore(&rtc_lock, flags); TRACE2(("gdth_search_drives(): RTC: %x/%x/%x\n",*(ulong32 *)&rtc[0], *(ulong32 *)&rtc[4], *(ulong32 *)&rtc[8])); /* 3. send to controller firmware */ _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 21/28] cleanup variable usage in mesh interrupt handler
From: Olaf Hering <[EMAIL PROTECTED]> _ convert void* to struct mesh_state* - remove unused irq argument from mesh_interrupt() Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/mesh.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff -puN drivers/scsi/mesh.c~cleanup-variable-usage-in-mesh-interrupt-handler drivers/scsi/mesh.c --- a/drivers/scsi/mesh.c~cleanup-variable-usage-in-mesh-interrupt-handler +++ a/drivers/scsi/mesh.c @@ -185,7 +185,7 @@ struct mesh_state { * Driver is too messy, we need a few prototypes... */ static void mesh_done(struct mesh_state *ms, int start_next); -static void mesh_interrupt(int irq, void *dev_id); +static void mesh_interrupt(struct mesh_state *ms); static void cmd_complete(struct mesh_state *ms); static void set_dma_cmds(struct mesh_state *ms, struct scsi_cmnd *cmd); static void halt_dma(struct mesh_state *ms); @@ -466,7 +466,7 @@ static void mesh_start_cmd(struct mesh_s dlog(ms, "intr b4 arb, intr/exc/err/fc=%.8x", MKWORD(mr->interrupt, mr->exception, mr->error, mr->fifo_count)); - mesh_interrupt(0, (void *)ms); + mesh_interrupt(ms); if (ms->phase != arbitrating) return; } @@ -504,7 +504,7 @@ static void mesh_start_cmd(struct mesh_s dlog(ms, "intr after disresel, intr/exc/err/fc=%.8x", MKWORD(mr->interrupt, mr->exception, mr->error, mr->fifo_count)); - mesh_interrupt(0, (void *)ms); + mesh_interrupt(ms); if (ms->phase != arbitrating) return; dlog(ms, "after intr after disresel, intr/exc/err/fc=%.8x", @@ -1018,10 +1018,11 @@ static void handle_reset(struct mesh_sta static irqreturn_t do_mesh_interrupt(int irq, void *dev_id) { unsigned long flags; - struct Scsi_Host *dev = ((struct mesh_state *)dev_id)->host; + struct mesh_state *ms = dev_id; + struct Scsi_Host *dev = ms->host; spin_lock_irqsave(dev->host_lock, flags); - mesh_interrupt(irq, dev_id); + mesh_interrupt(ms); spin_unlock_irqrestore(dev->host_lock, flags); return IRQ_HANDLED; } @@ -1661,9 +1662,8 @@ static int mesh_queue(struct scsi_cmnd * * handler (do_mesh_interrupt) or by other functions in * exceptional circumstances */ -static void mesh_interrupt(int irq, void *dev_id) +static void mesh_interrupt(struct mesh_state *ms) { - struct mesh_state *ms = (struct mesh_state *) dev_id; volatile struct mesh_regs __iomem *mr = ms->mesh; int intr; _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 23/28] mpt-fusion: reprogram spi state after host reset
From: Eric Moore <[EMAIL PROTECTED]> After host reset, the device are programmed to default asyn narrow nego. We need to reprogram the parameter back to previous values. If the host reset is called as a result of spi_dv_device() commands timing out, its possible to get into an infinite loop of dv to host reset. This will prevent that case, as we merely program old values. If host reset is called outside context of domain validation, then we can call spi_dv_device. Please apply. Signed-off-by: Eric Moore <[EMAIL PROTECTED]> Cc: Mark Haverkamp <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/message/fusion/mptbase.h |1 + drivers/message/fusion/mptspi.c | 23 +-- 2 files changed, 22 insertions(+), 2 deletions(-) diff -puN drivers/message/fusion/mptbase.h~scsi-spi-transport-scsi-domain-validation-after-reset drivers/message/fusion/mptbase.h --- a/drivers/message/fusion/mptbase.h~scsi-spi-transport-scsi-domain-validation-after-reset +++ a/drivers/message/fusion/mptbase.h @@ -994,6 +994,7 @@ typedef struct _MPT_SCSI_HOST { int scandv_wait_done; long last_queue_full; u16 tm_iocstatus; + u16 spi_pending; struct list_head target_reset_list; } MPT_SCSI_HOST; diff -puN drivers/message/fusion/mptspi.c~scsi-spi-transport-scsi-domain-validation-after-reset drivers/message/fusion/mptspi.c --- a/drivers/message/fusion/mptspi.c~scsi-spi-transport-scsi-domain-validation-after-reset +++ a/drivers/message/fusion/mptspi.c @@ -676,7 +676,9 @@ static void mptspi_dv_device(struct _MPT return; } + hd->spi_pending |= (1 << sdev->id); spi_dv_device(sdev); + hd->spi_pending &= ~(1 << sdev->id); if (sdev->channel == 1 && mptscsih_quiesce_raid(hd, 0, vtarget->channel, vtarget->id) < 0) @@ -1202,11 +1204,27 @@ mptspi_dv_renegotiate_work(struct work_s container_of(work, struct work_queue_wrapper, work); struct _MPT_SCSI_HOST *hd = wqw->hd; struct scsi_device *sdev; + struct scsi_target *starget; + struct _CONFIG_PAGE_SCSI_DEVICE_1 pg1; + u32 nego; kfree(wqw); - shost_for_each_device(sdev, hd->ioc->sh) - mptspi_dv_device(hd, sdev); + if (hd->spi_pending) { + shost_for_each_device(sdev, hd->ioc->sh) { + if (hd->spi_pending & (1 << sdev->id)) + continue; + starget = scsi_target(sdev); + nego = mptspi_getRP(starget); + pg1.RequestedParameters = cpu_to_le32(nego); + pg1.Reserved = 0; + pg1.Configuration = 0; + mptspi_write_spi_device_pg1(starget, &pg1); + } + } else { + shost_for_each_device(sdev, hd->ioc->sh) + mptspi_dv_device(hd, sdev); + } } static void @@ -1452,6 +1470,7 @@ mptspi_probe(struct pci_dev *pdev, const init_waitqueue_head(&hd->scandv_waitq); hd->scandv_wait_done = 0; hd->last_queue_full = 0; + hd->spi_pending = 0; /* Some versions of the firmware don't support page 0; without * that we can't get the parameters */ _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 22/28] Fix |/|| confusion in fusion driver
From: Dirk Mueller <[EMAIL PROTECTED]> This patch corrects a |/|| confusion in mptscsih_copy_sense_data. Using || means that the data that ends up being written is (almost always) 1, instead of being bit-wise or'ed. Cc: Eric Moore <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/message/fusion/mptscsih.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -puN drivers/message/fusion/mptscsih.c~fix--confusion-in-fusion-driver drivers/message/fusion/mptscsih.c --- a/drivers/message/fusion/mptscsih.c~fix--confusion-in-fusion-driver +++ a/drivers/message/fusion/mptscsih.c @@ -2463,9 +2463,9 @@ mptscsih_copy_sense_data(struct scsi_cmn ioc->events[idx].event = MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE; ioc->events[idx].eventContext = ioc->eventContext; - ioc->events[idx].data[0] = (pReq->LUN[1] << 24) || - (MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA << 16) || - (sc->device->channel << 8) || sc->device->id; + ioc->events[idx].data[0] = (pReq->LUN[1] << 24) | + (MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA << 16) | + (sc->device->channel << 8) | sc->device->id; ioc->events[idx].data[1] = (sense_data[13] << 8) || sense_data[12]; _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 20/28] drivers/scsi/aic7xxx_old: Convert to generic boolean-values
From: Richard Knutsson <[EMAIL PROTECTED]> Convert: FALSE -> false TRUE -> true Signed-off-by: Richard Knutsson <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/aic7xxx_old.c | 242 ++ drivers/scsi/aic7xxx_old/aic7xxx_proc.c |2 2 files changed, 119 insertions(+), 125 deletions(-) diff -puN drivers/scsi/aic7xxx_old.c~drivers-scsi-aic7xxx_old-convert-to-generic-boolean-values drivers/scsi/aic7xxx_old.c --- a/drivers/scsi/aic7xxx_old.c~drivers-scsi-aic7xxx_old-convert-to-generic-boolean-values +++ a/drivers/scsi/aic7xxx_old.c @@ -255,12 +255,6 @@ #define ALL_LUNS -1 #define MAX_TARGETS 16 #define MAX_LUNS 8 -#ifndef TRUE -# define TRUE 1 -#endif -#ifndef FALSE -# define FALSE 0 -#endif #if defined(__powerpc__) || defined(__i386__) || defined(__x86_64__) # define MMAPIO @@ -1382,7 +1376,7 @@ aic7xxx_setup(char *s) char *tok, *tok_end, *tok_end2; char tok_list[] = { '.', ',', '{', '}', '\0' }; int i, instance = -1, device = -1; -unsigned char done = FALSE; +unsigned char done = false; base = p; tok = base + n + 1; /* Forward us just past the ':' */ @@ -1410,14 +1404,14 @@ aic7xxx_setup(char *s) case ',': case '.': if (instance == -1) -done = TRUE; +done = true; else if (device >= 0) device++; else if (instance >= 0) instance++; if ( (device >= MAX_TARGETS) || (instance >= ARRAY_SIZE(aic7xxx_tag_info)) ) -done = TRUE; +done = true; tok++; if (!done) { @@ -1425,10 +1419,10 @@ aic7xxx_setup(char *s) } break; case '\0': - done = TRUE; + done = true; break; default: - done = TRUE; + done = true; tok_end = strchr(tok, '\0'); for(i=0; tok_list[i]; i++) { @@ -1436,7 +1430,7 @@ aic7xxx_setup(char *s) if ( (tok_end2) && (tok_end2 < tok_end) ) { tok_end = tok_end2; - done = FALSE; + done = false; } } if ( (instance >= 0) && (device >= 0) && @@ -1771,7 +1765,7 @@ aic7xxx_loadseq(struct aic7xxx_host *p) aic_outb(p, 0, SEQADDR0); aic_outb(p, 0, SEQADDR1); aic_outb(p, FASTMODE | FAILDIS, SEQCTL); - unpause_sequencer(p, TRUE); + unpause_sequencer(p, true); mdelay(1); pause_sequencer(p); aic_outb(p, FASTMODE, SEQCTL); @@ -1820,7 +1814,7 @@ aic7xxx_print_sequencer(struct aic7xxx_h aic_outb(p, 0, SEQADDR0); aic_outb(p, 0, SEQADDR1); aic_outb(p, FASTMODE | FAILDIS, SEQCTL); - unpause_sequencer(p, TRUE); + unpause_sequencer(p, true); mdelay(1); pause_sequencer(p); aic_outb(p, FASTMODE, SEQCTL); @@ -1868,7 +1862,7 @@ aic7xxx_find_syncrate(struct aic7xxx_hos unsigned int maxsync, unsigned char *options) { struct aic7xxx_syncrate *syncrate; - int done = FALSE; + int done = false; switch(*options) { @@ -1924,7 +1918,7 @@ aic7xxx_find_syncrate(struct aic7xxx_hos case MSG_EXT_PPR_OPTION_DT_UNITS: if(!(syncrate->sxfr_ultra2 & AHC_SYNCRATE_CRC)) { -done = TRUE; +done = true; /* * oops, we went too low for the CRC/DualEdge signalling, so * clear the options byte @@ -1938,7 +1932,7 @@ aic7xxx_find_syncrate(struct aic7xxx_hos } else { -done = TRUE; +done = true; if(syncrate == &aic7xxx_syncrates[maxsync]) { *period = syncrate->period; @@ -1948,7 +1942,7 @@ aic7xxx_find_syncrate(struct aic7xxx_hos default: if(!(syncrate->sxfr_ultra2 & AHC_SYNCRATE_CRC)) { -done = TRUE; +done = true; if(syncrate == &aic7xxx_syncrates[maxsync]) { *period = syncrate->period; @@ -2720,7 +2714,7 @@ aic7xxx_done(struct aic7xxx_host *p, str if ((scb->flags & SCB_MSGOUT_BITS) != 0) { unsigned short mask; -int message_error = FALSE; +int message_error = false; mask = 0x01 << tindex; @@ -2732,7 +2726,7 @@ aic7xxx_done(struct aic7xxx_host *p, str ((scb->cmd->sense_buffer[12] == 0x43) || /* INVALID_MESSAGE */ (scb->cmd->sense_buffer[12] == 0x49))) /* MESSAGE_ERROR */ { - message_error = TRUE; + message_error = true; } if (scb->flags & SCB_MSGOUT_WDTR) @@ -2830,7 +2824,7 @@ aic7xxx_
[patch 10/28] drivers/scsi/mca_53c9x.c : save_flags()/cli() removal
From: Amol Lad <[EMAIL PROTECTED]> Replaced save_flags()/cli() with spin_lock alternatives [EMAIL PROTECTED]: no longer BROKEN_ON_SMP] Signed-off-by: Amol Lad <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Cc: Alan Cox <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/mca_53c9x.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff -puN drivers/scsi/mca_53c9x.c~drivers-scsi-mca_53c9xc-save_flags-cli-removal drivers/scsi/mca_53c9x.c --- a/drivers/scsi/mca_53c9x.c~drivers-scsi-mca_53c9xc-save_flags-cli-removal +++ a/drivers/scsi/mca_53c9x.c @@ -341,9 +341,7 @@ static void dma_init_read(struct NCR_ESP { unsigned long flags; - - save_flags(flags); - cli(); + spin_lock_irqsave(esp->ehost->host_lock, flags); mca_disable_dma(esp->dma); mca_set_dma_mode(esp->dma, MCA_DMA_MODE_XFER | MCA_DMA_MODE_16 | @@ -352,16 +350,14 @@ static void dma_init_read(struct NCR_ESP mca_set_dma_count(esp->dma, length / 2); /* !!! */ mca_enable_dma(esp->dma); - restore_flags(flags); + spin_unlock_irqrestore(esp->ehost->host_lock, flags); } static void dma_init_write(struct NCR_ESP *esp, __u32 addr, int length) { unsigned long flags; - - save_flags(flags); - cli(); + spin_lock_irqsave(esp->ehost->host_lock, flags); mca_disable_dma(esp->dma); mca_set_dma_mode(esp->dma, MCA_DMA_MODE_XFER | MCA_DMA_MODE_WRITE | @@ -370,7 +366,7 @@ static void dma_init_write(struct NCR_ES mca_set_dma_count(esp->dma, length / 2); /* !!! */ mca_enable_dma(esp->dma); - restore_flags(flags); + spin_unlock_irqrestore(esp->ehost->host_lock, flags); } static void dma_ints_off(struct NCR_ESP *esp) _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 07/28] drivers/scsi/NCR5380.c: Replacing yield() with a better alternative
From: Amol Lad <[EMAIL PROTECTED]> Replaced yield() with cond_resched() Signed-off-by: Amol Lad <[EMAIL PROTECTED]> Acked-by: Alan Cox <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/NCR5380.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/scsi/NCR5380.c~drivers-scsi-ncr5380c-replacing-yield-with-a drivers/scsi/NCR5380.c --- a/drivers/scsi/NCR5380.c~drivers-scsi-ncr5380c-replacing-yield-with-a +++ a/drivers/scsi/NCR5380.c @@ -347,7 +347,7 @@ static int NCR5380_poll_politely(struct if((r & bit) == val) return 0; if(!in_interrupt()) - yield(); + cond_resched(); else cpu_relax(); } _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 25/28] Use unchecked_isa_dma in sd_revalidate_disk()
From: Bernhard Walle <[EMAIL PROTECTED]> In sd_revalidate_disk(), the SCSI Disk driver needs a few bytes DMA memory, allocated by kmalloc() and __GFP_DMA. This patch uses __GFP_DMA only if the corresponding host structure has unchecked_isa_dma set. Signed-off-by: Bernhard Walle <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Acked-by: Jens Axboe <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/sd.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/scsi/sd.c~use-unchecked_isa_dma-in-sd_revalidate_disk drivers/scsi/sd.c --- a/drivers/scsi/sd.c~use-unchecked_isa_dma-in-sd_revalidate_disk +++ a/drivers/scsi/sd.c @@ -1516,7 +1516,8 @@ static int sd_revalidate_disk(struct gen if (!scsi_device_online(sdp)) goto out; - buffer = kmalloc(SD_BUF_SIZE, GFP_KERNEL | __GFP_DMA); + buffer = kmalloc(SD_BUF_SIZE, GFP_KERNEL | + (sdp->host->unchecked_isa_dma ? __GFP_DMA : 0)); if (!buffer) { sd_printk(KERN_WARNING, sdkp, "sd_revalidate_disk: Memory " "allocation failure.\n"); _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 12/28] sym53c8xx_2 claims cpqarray device
From: Chip Coldwell <[EMAIL PROTECTED]> Apropos this thread http://marc.theaimsgroup.com/?l=linux-scsi&m=115591706804045&w=2 which led to this patch http://www.kernel.org/git/?p=linux/kernel/git/jejb/scsi-rc-fixes-2.6.git;a=commit;h=b2b3c121076961333977f485f0d54c22121df920 do we not also need the following patch, nine lines lower in the same file? Signed-off-by: Chip Coldwell <[EMAIL PROTECTED]> Cc: Matthew Wilcox <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/sym53c8xx_2/sym_glue.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/scsi/sym53c8xx_2/sym_glue.c~sym53c8xx_2-claims-cpqarray-device drivers/scsi/sym53c8xx_2/sym_glue.c --- a/drivers/scsi/sym53c8xx_2/sym_glue.c~sym53c8xx_2-claims-cpqarray-device +++ a/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -2094,7 +2094,7 @@ static struct pci_device_id sym2_id_tabl { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C875, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C1510, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, /* new */ + PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_SCSI<<8, 0x00, 0UL }, /* new */ { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_53C895A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_53C875A, _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 05/28] pci_module_init() convertion in tmscsim.c
From: Henrik Kretzschmar <[EMAIL PROTECTED]> pci_module_init() convertion in tmscsim.c Signed-off-by: Henrik Kretzschmar <[EMAIL PROTECTED]> Acked-by: Alan Cox <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/tmscsim.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff -puN drivers/scsi/tmscsim.c~pci_module_init-convertion-in-tmscsimc drivers/scsi/tmscsim.c --- a/drivers/scsi/tmscsim.c~pci_module_init-convertion-in-tmscsimc +++ a/drivers/scsi/tmscsim.c @@ -177,6 +177,8 @@ * 2.1d 04/05/27 GL Moved setting of scan_devices to* * slave_alloc/_configure/_destroy, as * * suggested by CH.* + * 2.1e 06/09/04 HENKR change pci_module_init() to * + * pci_register_driver() * ***/ /* DEBUG options */ @@ -244,7 +246,7 @@ #define DC390_BANNER "Tekram DC390/AM53C974" -#define DC390_VERSION "2.1d 2004-05-27" +#define DC390_VERSION "2.1e 2006-09-04" #define PCI_DEVICE_ID_AMD53C974PCI_DEVICE_ID_AMD_SCSI @@ -2680,7 +2682,7 @@ static int __init dc390_module_init(void printk (KERN_INFO "DC390: Using safe settings.\n"); } - return pci_module_init(&dc390_driver); + return pci_register_driver(&dc390_driver); } static void __exit dc390_module_exit(void) _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 17/28] Remove some unused SCSI-related kernel config variables.
From: "Robert P. J. Day" <[EMAIL PROTECTED]> Remove the unused SCSI-related kernel config variables SCSI_NCR53C8XX_PROFILE_SUPPORT SCSI_NCR53C8XX_PROFILE 53C700_IO_MAPPED AIC79XX_ENABLE_RD_STRM AIC7XXX_PROBE_EISA_VL Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- Documentation/scsi/ncr53c8xx.txt |5 - drivers/scsi/Kconfig | 16 drivers/scsi/aic7xxx/Kconfig.aic79xx | 12 drivers/scsi/aic7xxx/Kconfig.aic7xxx | 10 -- 4 files changed, 43 deletions(-) diff -puN Documentation/scsi/ncr53c8xx.txt~remove-some-unused-scsi-related-kernel-config-variables Documentation/scsi/ncr53c8xx.txt --- a/Documentation/scsi/ncr53c8xx.txt~remove-some-unused-scsi-related-kernel-config-variables +++ a/Documentation/scsi/ncr53c8xx.txt @@ -562,11 +562,6 @@ if only one has a flaw for some SCSI fea support by the driver of this feature at linux start-up and enable this feature after boot-up only for devices that support it safely. -CONFIG_SCSI_NCR53C8XX_PROFILE_SUPPORT (default answer: n) -This option must be set for profiling information to be gathered -and printed out through the proc file system. This features may -impact performances. - CONFIG_SCSI_NCR53C8XX_IOMAPPED (default answer: n) Answer "y" if you suspect your mother board to not allow memory mapped I/O. May slow down performance a little. This option is required by diff -puN drivers/scsi/Kconfig~remove-some-unused-scsi-related-kernel-config-variables drivers/scsi/Kconfig --- a/drivers/scsi/Kconfig~remove-some-unused-scsi-related-kernel-config-variables +++ a/drivers/scsi/Kconfig @@ -1200,17 +1200,6 @@ config SCSI_NCR53C8XX_SYNC There is no safe option other than using good cabling, right terminations and SCSI conformant devices. -config SCSI_NCR53C8XX_PROFILE - bool "enable profiling" - depends on SCSI_ZALON || SCSI_NCR_Q720 - help - This option allows you to enable profiling information gathering. - These statistics are not very accurate due to the low frequency - of the kernel clock (100 Hz on i386) and have performance impact - on systems that use very fast devices. - - The normal answer therefore is N. - config SCSI_NCR53C8XX_NO_DISCONNECT bool "not allow targets to disconnect" depends on (SCSI_ZALON || SCSI_NCR_Q720) && SCSI_NCR53C8XX_DEFAULT_TAGS=0 @@ -1340,11 +1329,6 @@ config SCSI_SIM710 It currently supports Compaq EISA cards and NCR MCA cards -config 53C700_IO_MAPPED - bool - depends on SCSI_SIM710 - default y - config SCSI_SYM53C416 tristate "Symbios 53c416 SCSI support" depends on ISA && SCSI diff -puN drivers/scsi/aic7xxx/Kconfig.aic79xx~remove-some-unused-scsi-related-kernel-config-variables drivers/scsi/aic7xxx/Kconfig.aic79xx --- a/drivers/scsi/aic7xxx/Kconfig.aic79xx~remove-some-unused-scsi-related-kernel-config-variables +++ a/drivers/scsi/aic7xxx/Kconfig.aic79xx @@ -57,18 +57,6 @@ config AIC79XX_BUILD_FIRMWARE or modify the assembler Makefile or the files it includes if your build environment is different than that of the author. -config AIC79XX_ENABLE_RD_STRM - bool "Enable Read Streaming for All Targets" - depends on SCSI_AIC79XX - default n - help - Read Streaming is a U320 protocol option that should enhance - performance. Early U320 drive firmware actually performs slower - with read streaming enabled so it is disabled by default. Read - Streaming can be configured in much the same way as tagged queueing - using the "rd_strm" command line option. See - drivers/scsi/aic7xxx/README.aic79xx for details. - config AIC79XX_DEBUG_ENABLE bool "Compile in Debugging Code" depends on SCSI_AIC79XX diff -puN drivers/scsi/aic7xxx/Kconfig.aic7xxx~remove-some-unused-scsi-related-kernel-config-variables drivers/scsi/aic7xxx/Kconfig.aic7xxx --- a/drivers/scsi/aic7xxx/Kconfig.aic7xxx~remove-some-unused-scsi-related-kernel-config-variables +++ a/drivers/scsi/aic7xxx/Kconfig.aic7xxx @@ -50,16 +50,6 @@ config AIC7XXX_RESET_DELAY_MS Default: 5000 (5 seconds) -config AIC7XXX_PROBE_EISA_VL - bool "Probe for EISA and VL AIC7XXX Adapters" - depends on SCSI_AIC7XXX && EISA - help - Probe for EISA and VLB Aic7xxx controllers. In many newer systems, - the invasive probes necessary to detect these controllers can cause - other devices to fail. For this reason, the non-PCI probe code is - disabled by default. The current value of this option can be "toggled" - via the no_probe kernel command line option. - config AIC7XXX_BUILD_FIRMWARE bool "Build Adapter Firmware with Kernel Build" depends on SCSI_AIC7X
[patch 27/28] fdomain.c: get rid of unused stuff
From: Parag Warudkar <[EMAIL PROTECTED]> fdomain.c uses the below stuff only if PCMCIA is not defined. This causes unused variables to be defined when PCMCIA is not defined. Wrap variables and functions around #ifndef PCMCIA appropriately to avoid this. 4 less compiler warnings. Signed-off-by: Parag Warudkar <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/fdomain.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff -puN drivers/scsi/fdomain.c~fdomainc-get-rid-of-unused-stuff drivers/scsi/fdomain.c --- a/drivers/scsi/fdomain.c~fdomainc-get-rid-of-unused-stuff +++ a/drivers/scsi/fdomain.c @@ -410,6 +410,7 @@ static irqreturn_t do_fdomain_16x0 static char * fdomain = NULL; module_param(fdomain, charp, 0); +#ifndef PCMCIA static unsigned long addresses[] = { 0xc8000, 0xca000, @@ -502,6 +503,7 @@ static struct signature { }; #define SIGNATURE_COUNT ARRAY_SIZE(signatures) +#endif /* ifndef PCMCIA */ static void print_banner( struct Scsi_Host *shpnt ) { @@ -646,7 +648,7 @@ static int fdomain_test_loopback( void ) Sometimes it is possible to use the computer's BIOS setup screen to configure a PCI system so that one of these IRQs will be used by the Future Domain card. */ - +#ifndef PCMCIA static int fdomain_get_irq( int base ) { int options = inb(base + Configuration1); @@ -664,6 +666,7 @@ static int fdomain_get_irq( int base ) return 0; return ints[(options & 0x0e) >> 1]; } +#endif static int fdomain_isa_detect( int *irq, int *iobase ) { _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 24/28] SCSI newstyle hotplug/coldplug support
From: David Brownell <[EMAIL PROTECTED]> This teaches scsi devices how to support "new style" hotplug/coldplug: using a modalias sysfs attribute for coldplug, and MODALIAS environment variable for hotplug. It also updates the CH, SD, SR, and ST drivers with the aliases needed to drive them by that mechanism. (Older OnStream devices use OSST not ST; left for someone else to sort out. SG seems best loaded by KMOD.) Using this, I've seen pure new-style hotplugging drive the loading of all the relevant driver modules for usb storage devices: host controller, usb-storage, scsi core, sd_mod. Previously, sd_mod never loaded. (Except when using the obsolete old-style hotplug scripts ... which are unusable on ~100 BogoMIPS embedded systems that only run busybox, but may have no options for lots of external storage other than USB.) Yep, this is a LOT faster too. Signed-off-by: David Brownell <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Cc: Michael Tokarev <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/ch.c |1 + drivers/scsi/scsi_sysfs.c | 23 +++ drivers/scsi/sd.c |4 drivers/scsi/sr.c |2 ++ drivers/scsi/st.c |1 + 5 files changed, 31 insertions(+) diff -puN drivers/scsi/ch.c~scsi-newstyle-hotplug-coldplug-support drivers/scsi/ch.c --- a/drivers/scsi/ch.c~scsi-newstyle-hotplug-coldplug-support +++ a/drivers/scsi/ch.c @@ -38,6 +38,7 @@ MODULE_DESCRIPTION("device driver for sc MODULE_AUTHOR("Gerd Knorr <[EMAIL PROTECTED]>"); MODULE_LICENSE("GPL"); MODULE_ALIAS_CHARDEV_MAJOR(SCSI_CHANGER_MAJOR); +MODULE_ALIAS("scsi:type-08"); /* TYPE_MEDIUM_CHANGER */ static int init = 1; module_param(init, int, 0444); diff -puN drivers/scsi/scsi_sysfs.c~scsi-newstyle-hotplug-coldplug-support drivers/scsi/scsi_sysfs.c --- a/drivers/scsi/scsi_sysfs.c~scsi-newstyle-hotplug-coldplug-support +++ a/drivers/scsi/scsi_sysfs.c @@ -277,6 +277,18 @@ static int scsi_bus_match(struct device return (sdp->inq_periph_qual == SCSI_INQ_PQ_CON)? 1: 0; } +/* for hotplug support: modprobe $MODALIAS */ +static int scsi_uevent(struct device *dev, char **envp, int num_envp, + char *buffer, int buffer_size) +{ + struct scsi_device *sdp = to_scsi_device(dev); + + envp[0] = buffer; + snprintf(buffer, buffer_size, "MODALIAS=scsi:type-%02x", (u8)sdp->type); + envp[1] = NULL; + return 0; +} + static int scsi_bus_suspend(struct device * dev, pm_message_t state) { struct device_driver *drv = dev->driver; @@ -332,6 +344,7 @@ static int scsi_bus_resume(struct device struct bus_type scsi_bus_type = { .name = "scsi", .match = scsi_bus_match, + .uevent = scsi_uevent, .suspend= scsi_bus_suspend, .resume = scsi_bus_resume, }; @@ -571,6 +584,15 @@ show_sdev_iostat(iorequest_cnt); show_sdev_iostat(iodone_cnt); show_sdev_iostat(ioerr_cnt); +/* for coldplug support: modprobe $(cat .../modalias) */ +static ssize_t +show_modalias(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct scsi_device *sdev = to_scsi_device(dev); + + return snprintf(buf, 20, "scsi:type-%02x\n", (u8)sdev->type); +} +static DEVICE_ATTR(modalias, S_IRUGO, show_modalias, NULL); /* Default template for device attributes. May NOT be modified */ static struct device_attribute *scsi_sysfs_sdev_attrs[] = { @@ -590,6 +612,7 @@ static struct device_attribute *scsi_sys &dev_attr_iorequest_cnt, &dev_attr_iodone_cnt, &dev_attr_ioerr_cnt, + &dev_attr_modalias, NULL }; diff -puN drivers/scsi/sd.c~scsi-newstyle-hotplug-coldplug-support drivers/scsi/sd.c --- a/drivers/scsi/sd.c~scsi-newstyle-hotplug-coldplug-support +++ a/drivers/scsi/sd.c @@ -241,6 +241,10 @@ static struct scsi_driver sd_template = .issue_flush= sd_issue_flush, }; +MODULE_ALIAS("scsi:type-00"); /* TYPE_DISK */ +MODULE_ALIAS("scsi:type-07"); /* TYPE_MOD */ +MODULE_ALIAS("scsi:type-0e"); /* TYPE_RBC */ + /* * Device no to disk mapping: * diff -puN drivers/scsi/sr.c~scsi-newstyle-hotplug-coldplug-support drivers/scsi/sr.c --- a/drivers/scsi/sr.c~scsi-newstyle-hotplug-coldplug-support +++ a/drivers/scsi/sr.c @@ -62,6 +62,8 @@ MODULE_DESCRIPTION("SCSI cdrom (sr) driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_CDROM_MAJOR); +MODULE_ALIAS("scsi:type-04"); /* TYPE_WORM */ +MODULE_ALIAS("scsi:type-05"); /* TYPE_ROM */ #define SR_DISKS 256 diff -puN drivers/scsi/st.c~scsi-newstyle-hotplug-coldplug-support drivers/scsi/st.c --- a/drivers/scsi/st.c~scsi-newstyle-hotplug-coldplug-support +++ a/drivers/scsi/st.c @@ -89,6 +89,7 @@ MODULE_AUTHOR("Kai Makisara"); MODULE_DESCRIPTION("SCSI tape (st) driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS_CHARDEV_MAJOR(SCSI_TAPE_MAJOR);
[patch 01/28] drivers/scsi/: small cleanups
From: Adrian Bunk <[EMAIL PROTECTED]> This patch contains the following cleanups: - make needlessly global functions static - every file should #include the headers containing the prototypes for it's global functions Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/scsi_sysctl.c |1 + drivers/scsi/scsi_sysfs.c|3 ++- drivers/scsi/scsi_transport_fc.c |2 +- drivers/scsi/sr.c|2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff -puN drivers/scsi/scsi_sysctl.c~drivers-scsi-small-cleanups drivers/scsi/scsi_sysctl.c --- a/drivers/scsi/scsi_sysctl.c~drivers-scsi-small-cleanups +++ a/drivers/scsi/scsi_sysctl.c @@ -9,6 +9,7 @@ #include #include "scsi_logging.h" +#include "scsi_priv.h" static ctl_table scsi_table[] = { diff -puN drivers/scsi/scsi_sysfs.c~drivers-scsi-small-cleanups drivers/scsi/scsi_sysfs.c --- a/drivers/scsi/scsi_sysfs.c~drivers-scsi-small-cleanups +++ a/drivers/scsi/scsi_sysfs.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "scsi_priv.h" #include "scsi_logging.h" @@ -799,7 +800,7 @@ void scsi_remove_device(struct scsi_devi } EXPORT_SYMBOL(scsi_remove_device); -void __scsi_remove_target(struct scsi_target *starget) +static void __scsi_remove_target(struct scsi_target *starget) { struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); unsigned long flags; diff -puN drivers/scsi/scsi_transport_fc.c~drivers-scsi-small-cleanups drivers/scsi/scsi_transport_fc.c --- a/drivers/scsi/scsi_transport_fc.c~drivers-scsi-small-cleanups +++ a/drivers/scsi/scsi_transport_fc.c @@ -1797,7 +1797,7 @@ fc_rport_final_delete(struct work_struct * Notes: * This routine assumes no locks are held on entry. **/ -struct fc_rport * +static struct fc_rport * fc_rport_create(struct Scsi_Host *shost, int channel, struct fc_rport_identifiers *ids) { diff -puN drivers/scsi/sr.c~drivers-scsi-small-cleanups drivers/scsi/sr.c --- a/drivers/scsi/sr.c~drivers-scsi-small-cleanups +++ a/drivers/scsi/sr.c @@ -173,7 +173,7 @@ static void scsi_cd_put(struct scsi_cd * * an inode for that to work, and we do not always have one. */ -int sr_media_change(struct cdrom_device_info *cdi, int slot) +static int sr_media_change(struct cdrom_device_info *cdi, int slot) { struct scsi_cd *cd = cdi->handle; int retval; _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 02/28] drivers/scsi/advansys.c: cleanups
From: Adrian Bunk <[EMAIL PROTECTED]> - remove the unneeded advansys.h - remove the unused advansys_setup() - make needlessly global functions static Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/advansys.c | 101 +++--- drivers/scsi/advansys.h | 36 - 2 files changed, 8 insertions(+), 129 deletions(-) diff -puN drivers/scsi/advansys.c~drivers-scsi-advansysc-cleanups drivers/scsi/advansys.c --- a/drivers/scsi/advansys.c~drivers-scsi-advansysc-cleanups +++ a/drivers/scsi/advansys.c @@ -798,7 +798,6 @@ #include #include #include -#include "advansys.h" #ifdef CONFIG_PCI #include #endif /* CONFIG_PCI */ @@ -2014,7 +2013,7 @@ STATIC int AscSgListToQueue(int); STATIC void AscEnableIsaDma(uchar); #endif /* CONFIG_ISA */ STATIC ASC_DCNT AscGetMaxDmaCount(ushort); - +static const char *advansys_info(struct Scsi_Host *shp); /* * --- Adv Library Constants and Macros @@ -3970,10 +3969,6 @@ STATIC ushort asc_bus[ASC_NUM_BUS] __ini ASC_IS_PCI, }; -/* - * Used with the LILO 'advansys' option to eliminate or - * limit I/O port probing at boot time, cf. advansys_setup(). - */ STATIC int asc_iopflag = ASC_FALSE; STATIC int asc_ioport[ASC_NUM_IOPORT_PROBE] = { 0, 0, 0, 0 }; @@ -4055,10 +4050,6 @@ STATIC void asc_prt_hex(char *f, #endif /* ADVANSYS_DEBUG */ -/* - * --- Linux 'struct scsi_host_template' and advansys_setup() Functions - */ - #ifdef CONFIG_PROC_FS /* * advansys_proc_info() - /proc/scsi/advansys/[0-(ASC_NUM_BOARD_SUPPORTED-1)] @@ -4080,7 +4071,7 @@ STATIC void asc_prt_hex(char *f, * if 'prtbuf' is too small it will not be overwritten. Instead the * user just won't get all the available statistics. */ -int +static int advansys_proc_info(struct Scsi_Host *shost, char *buffer, char **start, off_t offset, int length, int inout) { @@ -4296,7 +4287,7 @@ advansys_proc_info(struct Scsi_Host *sho * it must not call SCSI mid-level functions including scsi_malloc() * and scsi_free(). */ -int __init +static int __init advansys_detect(struct scsi_host_template *tpnt) { static int detect_called = ASC_FALSE; @@ -5428,7 +5419,7 @@ advansys_detect(struct scsi_host_templat * * Release resources allocated for a single AdvanSys adapter. */ -int +static int advansys_release(struct Scsi_Host *shp) { asc_board_t*boardp; @@ -5475,7 +5466,7 @@ advansys_release(struct Scsi_Host *shp) * Note: The information line should not exceed ASC_INFO_SIZE bytes, * otherwise the static 'info' array will be overrun. */ -const char * +static const char * advansys_info(struct Scsi_Host *shp) { static char info[ASC_INFO_SIZE]; @@ -5568,7 +5559,7 @@ advansys_info(struct Scsi_Host *shp) * This function always returns 0. Command return status is saved * in the 'scp' result field. */ -int +static int advansys_queuecommand(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd *)) { struct Scsi_Host*shp; @@ -5656,7 +5647,7 @@ advansys_queuecommand(struct scsi_cmnd * * sleeping is allowed and no locking other than for host structures is * required. Returns SUCCESS or FAILED. */ -int +static int advansys_reset(struct scsi_cmnd *scp) { struct Scsi_Host *shp; @@ -5841,7 +5832,7 @@ advansys_reset(struct scsi_cmnd *scp) * ip[1]: sectors * ip[2]: cylinders */ -int +static int advansys_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int ip[]) { @@ -5875,82 +5866,6 @@ advansys_biosparam(struct scsi_device *s } /* - * advansys_setup() - * - * This function is called from init/main.c at boot time. - * It it passed LILO parameters that can be set from the - * LILO command line or in /etc/lilo.conf. - * - * It is used by the AdvanSys driver to either disable I/O - * port scanning or to limit scanning to 1 - 4 I/O ports. - * Regardless of the option setting EISA and PCI boards - * will still be searched for and detected. This option - * only affects searching for ISA and VL boards. - * - * If ADVANSYS_DEBUG is defined the driver debug level may - * be set using the 5th (ASC_NUM_IOPORT_PROBE + 1) I/O Port. - * - * Examples: - * 1. Eliminate I/O port scanning: - * boot: linux advansys= - * or - * boot: linux advansys=0x0 - * 2. Limit I/O port scanning to one I/O port: - *boot: linux advansys=0x110 - * 3. Limit I/O port scanning to four I/O ports: - *boot: linux advansys=0x110,0x210,0x230,0x330 - * 4. If ADVANSYS_DEBUG, limit I/O port scanning to four I/O ports and - *set the driver debug level to 2. - *boot: linux advansys=0x110,0x210,0x230,0x330,0xdeb2 - * - * ints[0] - number of arguments - * ints[1] - first argument - * ints[2] - second argument - * ... - */ -void __init -advansys_setup(char *str, int *ints) -{ -inti; - -if (asc_iopflag == ASC_TRUE) { -
[patch 06/28] drivers/scsi/dpt_i2o.c: remove dead code
From: Adrian Bunk <[EMAIL PROTECTED]> The Coverity checker spotted this dead code introduced by commit a07f353701acae77e023f6270e8af353b37af7c4. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/dpt_i2o.c |2 -- 1 file changed, 2 deletions(-) diff -puN drivers/scsi/dpt_i2o.c~drivers-scsi-dpt_i2oc-remove-dead-code drivers/scsi/dpt_i2o.c --- a/drivers/scsi/dpt_i2o.c~drivers-scsi-dpt_i2oc-remove-dead-code +++ a/drivers/scsi/dpt_i2o.c @@ -195,8 +195,6 @@ static int adpt_detect(struct scsi_host_ pci_dev_get(pDev); } } - if (pDev) - pci_dev_put(pDev); /* In INIT state, Activate IOPs */ for (pHba = hba_chain; pHba; pHba = pHba->next) { _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 03/28] megaraid: fix warnings when CONFIG_PROC_FS=n
From: walter harms <[EMAIL PROTECTED]> Signed-off-by: walter harms <[EMAIL PROTECTED]> Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Cc: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/megaraid.c | 17 +++-- drivers/scsi/megaraid.h |4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff -puN drivers/scsi/megaraid.c~megaraid-fix-warnings-when-config_proc_fs=n drivers/scsi/megaraid.c --- a/drivers/scsi/megaraid.c~megaraid-fix-warnings-when-config_proc_fs=n +++ a/drivers/scsi/megaraid.c @@ -3177,7 +3177,10 @@ proc_rdrv(adapter_t *adapter, char *page return len; } - +#else +static inline void mega_create_proc_entry(int index, struct proc_dir_entry *parent) +{ +} #endif @@ -4342,7 +4345,7 @@ mega_support_cluster(adapter_t *adapter) return 0; } - +#ifdef CONFIG_PROC_FS /** * mega_adapinq() * @adapter - pointer to our soft state @@ -4447,7 +4450,7 @@ mega_internal_dev_inquiry(adapter_t *ada return rval; } - +#endif /** * mega_internal_command() @@ -4965,7 +4968,6 @@ megaraid_remove_one(struct pci_dev *pdev { struct Scsi_Host *host = pci_get_drvdata(pdev); adapter_t *adapter = (adapter_t *)host->hostdata; - charbuf[12] = { 0 }; scsi_remove_host(host); @@ -5011,8 +5013,11 @@ megaraid_remove_one(struct pci_dev *pdev remove_proc_entry("raiddrives-30-39", adapter->controller_proc_dir_entry); #endif - sprintf(buf, "hba%d", adapter->host->host_no); - remove_proc_entry(buf, mega_proc_dir_entry); + { + charbuf[12] = { 0 }; + sprintf(buf, "hba%d", adapter->host->host_no); + remove_proc_entry(buf, mega_proc_dir_entry); + } } #endif diff -puN drivers/scsi/megaraid.h~megaraid-fix-warnings-when-config_proc_fs=n drivers/scsi/megaraid.h --- a/drivers/scsi/megaraid.h~megaraid-fix-warnings-when-config_proc_fs=n +++ a/drivers/scsi/megaraid.h @@ -1002,7 +1002,6 @@ static int megaraid_reset(Scsi_Cmnd *); static int megaraid_abort_and_reset(adapter_t *, Scsi_Cmnd *, int); static int megaraid_biosparam(struct scsi_device *, struct block_device *, sector_t, int []); -static int mega_print_inquiry(char *, char *); static int mega_build_sglist (adapter_t *adapter, scb_t *scb, u32 *buffer, u32 *length); @@ -1024,6 +1023,7 @@ static int mega_init_scb (adapter_t *); static int mega_is_bios_enabled (adapter_t *); #ifdef CONFIG_PROC_FS +static int mega_print_inquiry(char *, char *); static void mega_create_proc_entry(int, struct proc_dir_entry *); static int proc_read_config(char *, char **, off_t, int, int *, void *); static int proc_read_stat(char *, char **, off_t, int, int *, void *); @@ -1040,10 +1040,10 @@ static int proc_rdrv_20(char *, char **, static int proc_rdrv_30(char *, char **, off_t, int, int *, void *); static int proc_rdrv_40(char *, char **, off_t, int, int *, void *); static int proc_rdrv(adapter_t *, char *, int, int); -#endif static int mega_adapinq(adapter_t *, dma_addr_t); static int mega_internal_dev_inquiry(adapter_t *, u8, u8, dma_addr_t); +#endif static int mega_support_ext_cdb(adapter_t *); static mega_passthru* mega_prepare_passthru(adapter_t *, scb_t *, _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 13/28] drivers/scsi/wd33c93.c: cleanups
From: Adrian Bunk <[EMAIL PROTECTED]> - #include for getting the prototypes of {dis,en}able_irq() - make the needlessly global wd33c93_setup() static Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/wd33c93.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN drivers/scsi/wd33c93.c~drivers-scsi-wd33c93c-cleanups drivers/scsi/wd33c93.c --- a/drivers/scsi/wd33c93.c~drivers-scsi-wd33c93c-cleanups +++ a/drivers/scsi/wd33c93.c @@ -89,6 +89,8 @@ #include #include +#include + #include "wd33c93.h" #define optimum_sx_per(hostdata) (hostdata)->sx_table[1].period_ns @@ -1762,7 +1764,7 @@ static char setup_buffer[SETUP_BUFFER_SI static char setup_used[MAX_SETUP_ARGS]; static int done_setup = 0; -int +static int wd33c93_setup(char *str) { int i; _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 11/28] drivers/scsi/aic7xxx/: make functions static
From: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Acked-by: Hannes Reinecke <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/aic7xxx/aic79xx_osm.c |6 -- drivers/scsi/aic7xxx/aic79xx_osm.h |2 -- drivers/scsi/aic7xxx/aic7xxx.h |5 - drivers/scsi/aic7xxx/aic7xxx_core.c |2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff -puN drivers/scsi/aic7xxx/aic79xx_osm.c~drivers-scsi-aic7xxx-make-functions-static drivers/scsi/aic7xxx/aic79xx_osm.c --- a/drivers/scsi/aic7xxx/aic79xx_osm.c~drivers-scsi-aic7xxx-make-functions-static +++ a/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -363,6 +363,8 @@ static int ahd_linux_run_command(struct struct scsi_cmnd *); static void ahd_linux_setup_tag_info_global(char *p); static int aic79xx_setup(char *c); +static void ahd_freeze_simq(struct ahd_softc *ahd); +static void ahd_release_simq(struct ahd_softc *ahd); static int ahd_linux_unit; @@ -2016,13 +2018,13 @@ ahd_linux_queue_cmd_complete(struct ahd_ cmd->scsi_done(cmd); } -void +static void ahd_freeze_simq(struct ahd_softc *ahd) { scsi_block_requests(ahd->platform_data->host); } -void +static void ahd_release_simq(struct ahd_softc *ahd) { scsi_unblock_requests(ahd->platform_data->host); diff -puN drivers/scsi/aic7xxx/aic79xx_osm.h~drivers-scsi-aic7xxx-make-functions-static drivers/scsi/aic7xxx/aic79xx_osm.h --- a/drivers/scsi/aic7xxx/aic79xx_osm.h~drivers-scsi-aic7xxx-make-functions-static +++ a/drivers/scsi/aic7xxx/aic79xx_osm.h @@ -837,8 +837,6 @@ int ahd_platform_alloc(struct ahd_softc void ahd_platform_free(struct ahd_softc *ahd); void ahd_platform_init(struct ahd_softc *ahd); void ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb); -void ahd_freeze_simq(struct ahd_softc *ahd); -void ahd_release_simq(struct ahd_softc *ahd); static __inline void ahd_freeze_scb(struct scb *scb) diff -puN drivers/scsi/aic7xxx/aic7xxx.h~drivers-scsi-aic7xxx-make-functions-static drivers/scsi/aic7xxx/aic7xxx.h --- a/drivers/scsi/aic7xxx/aic7xxx.h~drivers-scsi-aic7xxx-make-functions-static +++ a/drivers/scsi/aic7xxx/aic7xxx.h @@ -1278,11 +1278,6 @@ typedef enum { AHC_QUEUE_TAGGED } ahc_queue_alg; -void ahc_set_tags(struct ahc_softc *ahc, -struct scsi_cmnd *cmd, -struct ahc_devinfo *devinfo, -ahc_queue_alg alg); - / Target Mode */ #ifdef AHC_TARGET_MODE void ahc_send_lstate_events(struct ahc_softc *, diff -puN drivers/scsi/aic7xxx/aic7xxx_core.c~drivers-scsi-aic7xxx-make-functions-static drivers/scsi/aic7xxx/aic7xxx_core.c --- a/drivers/scsi/aic7xxx/aic7xxx_core.c~drivers-scsi-aic7xxx-make-functions-static +++ a/drivers/scsi/aic7xxx/aic7xxx_core.c @@ -2073,7 +2073,7 @@ ahc_set_width(struct ahc_softc *ahc, str /* * Update the current state of tagged queuing for a given target. */ -void +static void ahc_set_tags(struct ahc_softc *ahc, struct scsi_cmnd *cmd, struct ahc_devinfo *devinfo, ahc_queue_alg alg) { _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 16/28] make seagate_st0x_detect() static
From: Adrian Bunk <[EMAIL PROTECTED]> seagate_st0x_detect() can become static. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/seagate.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/scsi/seagate.c~make-seagate_st0x_detect-static drivers/scsi/seagate.c --- a/drivers/scsi/seagate.c~make-seagate_st0x_detect-static +++ a/drivers/scsi/seagate.c @@ -420,7 +420,7 @@ static inline void borken_wait (void) #define ULOOP( i ) for (clock = i*8;;) #define TIMEOUT (!(clock--)) -int __init seagate_st0x_detect (struct scsi_host_template * tpnt) +static int __init seagate_st0x_detect (struct scsi_host_template * tpnt) { struct Scsi_Host *instance; int i, j; _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 19/28] drivers/scsi/aacraid/: cleanups
From: Adrian Bunk <[EMAIL PROTECTED]> - proper prototypes for global code in aacraid.h - aac_rx_start_adapter() can now become static Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/aacraid/aacraid.h |3 +++ drivers/scsi/aacraid/linit.c |2 -- drivers/scsi/aacraid/nark.c|3 --- drivers/scsi/aacraid/rkt.c |3 --- drivers/scsi/aacraid/rx.c |2 +- 5 files changed, 4 insertions(+), 9 deletions(-) diff -puN drivers/scsi/aacraid/aacraid.h~drivers-scsi-aacraid-cleanups drivers/scsi/aacraid/aacraid.h --- a/drivers/scsi/aacraid/aacraid.h~drivers-scsi-aacraid-cleanups +++ a/drivers/scsi/aacraid/aacraid.h @@ -1843,8 +1843,11 @@ struct aac_driver_ident* aac_get_driver_ int aac_get_adapter_info(struct aac_dev* dev); int aac_send_shutdown(struct aac_dev *dev); int aac_probe_container(struct aac_dev *dev, int cid); +int _aac_rx_init(struct aac_dev *dev); +int aac_rx_select_comm(struct aac_dev *dev, int comm); extern int numacb; extern int acbsize; extern char aac_driver_version[]; extern int startup_timeout; extern int aif_timeout; +extern int expose_physicals; diff -puN drivers/scsi/aacraid/linit.c~drivers-scsi-aacraid-cleanups drivers/scsi/aacraid/linit.c --- a/drivers/scsi/aacraid/linit.c~drivers-scsi-aacraid-cleanups +++ a/drivers/scsi/aacraid/linit.c @@ -82,8 +82,6 @@ static LIST_HEAD(aac_devices); static int aac_cfg_major = -1; char aac_driver_version[] = AAC_DRIVER_FULL_VERSION; -extern int expose_physicals; - /* * Because of the way Linux names scsi devices, the order in this table has * become important. Check for on-board Raid first, add-in cards second. diff -puN drivers/scsi/aacraid/nark.c~drivers-scsi-aacraid-cleanups drivers/scsi/aacraid/nark.c --- a/drivers/scsi/aacraid/nark.c~drivers-scsi-aacraid-cleanups +++ a/drivers/scsi/aacraid/nark.c @@ -74,9 +74,6 @@ static int aac_nark_ioremap(struct aac_d int aac_nark_init(struct aac_dev * dev) { - extern int _aac_rx_init(struct aac_dev *dev); - extern int aac_rx_select_comm(struct aac_dev *dev, int comm); - /* * Fill in the function dispatch table. */ diff -puN drivers/scsi/aacraid/rkt.c~drivers-scsi-aacraid-cleanups drivers/scsi/aacraid/rkt.c --- a/drivers/scsi/aacraid/rkt.c~drivers-scsi-aacraid-cleanups +++ a/drivers/scsi/aacraid/rkt.c @@ -45,7 +45,6 @@ static int aac_rkt_select_comm(struct aac_dev *dev, int comm) { int retval; - extern int aac_rx_select_comm(struct aac_dev *dev, int comm); retval = aac_rx_select_comm(dev, comm); if (comm == AAC_COMM_MESSAGE) { /* @@ -97,8 +96,6 @@ static int aac_rkt_ioremap(struct aac_de int aac_rkt_init(struct aac_dev *dev) { - extern int _aac_rx_init(struct aac_dev *dev); - /* * Fill in the function dispatch table. */ diff -puN drivers/scsi/aacraid/rx.c~drivers-scsi-aacraid-cleanups drivers/scsi/aacraid/rx.c --- a/drivers/scsi/aacraid/rx.c~drivers-scsi-aacraid-cleanups +++ a/drivers/scsi/aacraid/rx.c @@ -294,7 +294,7 @@ static void aac_rx_notify_adapter(struct * Start up processing on an i960 based AAC adapter */ -void aac_rx_start_adapter(struct aac_dev *dev) +static void aac_rx_start_adapter(struct aac_dev *dev) { struct aac_init *init; _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 15/28] drivers/scsi/qla4xxx/: possible cleanups
From: Adrian Bunk <[EMAIL PROTECTED]> - make needlessly global code static - #if 0 unused functions Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Acked-by: Ravi Anand <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/scsi/qla4xxx/ql4_dbg.c |4 drivers/scsi/qla4xxx/ql4_glbl.h |9 - drivers/scsi/qla4xxx/ql4_init.c | 18 +- drivers/scsi/qla4xxx/ql4_iocb.c | 18 +- drivers/scsi/qla4xxx/ql4_mbx.c | 19 ++- drivers/scsi/qla4xxx/ql4_os.c |9 - 6 files changed, 40 insertions(+), 37 deletions(-) diff -puN drivers/scsi/qla4xxx/ql4_dbg.c~drivers-scsi-qla4xxx-possible-cleanups drivers/scsi/qla4xxx/ql4_dbg.c --- a/drivers/scsi/qla4xxx/ql4_dbg.c~drivers-scsi-qla4xxx-possible-cleanups +++ a/drivers/scsi/qla4xxx/ql4_dbg.c @@ -8,6 +8,8 @@ #include "ql4_def.h" #include +#if 0 + static void qla4xxx_print_srb_info(struct srb * srb) { printk("%s: srb = 0x%p, flags=0x%02x\n", __func__, srb, srb->flags); @@ -195,3 +197,5 @@ void qla4xxx_dump_buffer(void *b, uint32 if (cnt % 16) printk(KERN_DEBUG "\n"); } + +#endif /* 0 */ diff -puN drivers/scsi/qla4xxx/ql4_glbl.h~drivers-scsi-qla4xxx-possible-cleanups drivers/scsi/qla4xxx/ql4_glbl.h --- a/drivers/scsi/qla4xxx/ql4_glbl.h~drivers-scsi-qla4xxx-possible-cleanups +++ a/drivers/scsi/qla4xxx/ql4_glbl.h @@ -43,8 +43,6 @@ int qla4xxx_get_fwddb_entry(struct scsi_ uint16_t *tcp_source_port_num, uint16_t *connection_id); -struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host * ha, -uint32_t fw_ddb_index); int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index, dma_addr_t fw_ddb_entry_dma); @@ -55,18 +53,11 @@ void qla4xxx_get_crash_record(struct scs struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha); int qla4xxx_add_sess(struct ddb_entry *); void qla4xxx_destroy_sess(struct ddb_entry *ddb_entry); -int qla4xxx_conn_close_sess_logout(struct scsi_qla_host * ha, - uint16_t fw_ddb_index, - uint16_t connection_id, - uint16_t option); -int qla4xxx_clear_database_entry(struct scsi_qla_host * ha, -uint16_t fw_ddb_index); int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host * ha); int qla4xxx_get_fw_version(struct scsi_qla_host * ha); void qla4xxx_interrupt_service_routine(struct scsi_qla_host * ha, uint32_t intr_status); int qla4xxx_init_rings(struct scsi_qla_host * ha); -void qla4xxx_dump_buffer(void *b, uint32_t size); struct srb * qla4xxx_del_from_active_array(struct scsi_qla_host *ha, uint32_t index); void qla4xxx_srb_compl(struct scsi_qla_host *ha, struct srb *srb); int qla4xxx_reinitialize_ddb_list(struct scsi_qla_host * ha); diff -puN drivers/scsi/qla4xxx/ql4_init.c~drivers-scsi-qla4xxx-possible-cleanups drivers/scsi/qla4xxx/ql4_init.c --- a/drivers/scsi/qla4xxx/ql4_init.c~drivers-scsi-qla4xxx-possible-cleanups +++ a/drivers/scsi/qla4xxx/ql4_init.c @@ -7,9 +7,8 @@ #include "ql4_def.h" -/* - * QLogic ISP4xxx Hardware Support Function Prototypes. - */ +static struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha, + uint32_t fw_ddb_index); static void ql4xxx_set_mac_number(struct scsi_qla_host *ha) { @@ -48,7 +47,8 @@ static void ql4xxx_set_mac_number(struct * This routine deallocates and unlinks the specified ddb_entry from the * adapter's **/ -void qla4xxx_free_ddb(struct scsi_qla_host *ha, struct ddb_entry *ddb_entry) +static void qla4xxx_free_ddb(struct scsi_qla_host *ha, +struct ddb_entry *ddb_entry) { /* Remove device entry from list */ list_del_init(&ddb_entry->list); @@ -370,9 +370,9 @@ static struct ddb_entry* qla4xxx_get_ddb * must be initialized prior tocalling this routine * **/ -int qla4xxx_update_ddb_entry(struct scsi_qla_host *ha, -struct ddb_entry *ddb_entry, -uint32_t fw_ddb_index) +static int qla4xxx_update_ddb_entry(struct scsi_qla_host *ha, + struct ddb_entry *ddb_entry, + uint32_t fw_ddb_index) { struct dev_db_entry *fw_ddb_entry = NULL; dma_addr_t fw_ddb_entry_dma; @@ -450,8 +450,8 @@ int qla4xxx_update_ddb_entry(struct scsi * This routine allocates a ddb_entry, ititializes some values, and * inserts it into the ddb list. **/ -struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha, -uint32_t fw_ddb_index) +static struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha, + uint32_t fw_ddb_index) {
[patch 26/28] make mptspi_target_destroy() static
From: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Acked-by: Eric Moore <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/message/fusion/mptspi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/message/fusion/mptspi.c~make-mptspi_target_destroy-static drivers/message/fusion/mptspi.c --- a/drivers/message/fusion/mptspi.c~make-mptspi_target_destroy-static +++ a/drivers/message/fusion/mptspi.c @@ -445,7 +445,7 @@ static int mptspi_target_alloc(struct sc return 0; } -void +static void mptspi_target_destroy(struct scsi_target *starget) { if (starget->hostdata) _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: aic7xxx: aic7892(B): BUG: soft lockup detected on CPU#0!
thomas schorpp wrote: thomas schorpp wrote: James Bottomley wrote: On Sat, 2007-03-24 at 01:51 +0100, thomas schorpp wrote: no. so the pci layer reports wrong start: nonsense. it succeeds, confused function return with the error flag: // u_long start; // u_long start = 0xFFEFF000; u_long start = 0x3000; int error; struct resource* ret1; error = 0; // start = pci_resource_start(ahc->dev_softc, 1); if (start != 0) { *bus_addr = start; if ((ret1 = request_mem_region(start, 0x1000, "aic7xxx")) == 0) You can't do this. The pci_resource_start is getting the address of something called a Bus Address Register (BAR) it says in physical address space where the card is responding ... you can't simply set that to a random value. The problem you seem to have is that your system is reporting a BAR beyond 32 bits (4GB) which the card physically can't use. This could be because of a BIOS misconfiguration or because there's a bug in the PCI subsystem somewhere. James understood. waiting for LKML answers... meanwhile i found harder reason for a possible bounds problem with the driver code on x86_64: if i do: static int ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc, u_long *bus_addr, uint8_t __iomem **maddr) { // u_long start; uint32_t start; i get no free warning of "*nonexistant* resource" (it cant be nonexistant, cause it was definitely something mapped): tom1:/usr/src/linux# dmesg |grep -i free Freeing unused kernel memory: 208k freed with u_long type start i get it: Mar 24 03:41:47 localhost kernel: Trying to free nonexistent resourceinvestigating further... - hmm well i dont get the free warning cause release_mem_region(ahc->platform_data->mem_busaddr, 0x1000); isnt called, the hack fails error = ahc_linux_pci_reserve_mem_region(ahc, &base, &maddr); if (error == 0) { ok, so no bounds issue in the driver. LKML people are ignoring my report, i take this as agreement to a mb bios issue. will test the card with a latest debian kernel x86_64 netinstall cd on some other amd64 machine, but i need to find some in my reach here. i need more confirmation before working in the linux pci hal. y tom - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html