Re: [PATCH 22/82] remove linux/version.h from drivers/message/fus ion
On Tuesday, July 19, 2005 9:12 PM, Matt Domsch wrote: What you illustrated above is not going to work. If your doing #ifndef around a function, such as scsi_device_online, it's not going to compile when scsi_device_online is already implemented in the kernel tree. The routine scsi_device_online is a function, not a define. For a define this would work. Sure it does, function names are defined symbols. No its not compiling for me. I'm currently building drivers for the DELL DKMS kit. Trying to add support for SLES9 SP2 support ( -191 kernel). My driver compiles for SLES9 Base(-97) and SP2(-139) but fails for SP2. Between SP1 and SP2, they added msleep. Here is the make.log output that you will find in /var/lib/dkms/mptlinux/3.02.52/build when it fails to compile. Also attached is linux_compat.h with the changes you have suggested. linux_compat.h Description: Binary data make.log Description: Binary data
Re: [PATCH 22/82] remove linux/version.h from drivers/message/fus ion
On Tue, 19 Jul 2005 22:12:49 -0500 Matt Domsch <[EMAIL PROTECTED]> wrote: > > Sure it does, function names are defined symbols. > > I'm doing exactly this in my backport of the openipmi drivers to RHEL4 > and SLES9. I missed the smiley, right :-) -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpUM4okjfTer.pgp Description: PGP signature
Re: Kernel 2.4.26 cannot umount CD: device or resource busy (no fuser)
Jim wrote: Symptom: Cannot umount a CD-Rom in my CD-Roaster/Burner/Toaster whatever Reason to write to ide AND Scsi-List: Its an IDE - Drive, but with scsi-emulation running. So my 4 questions: WHY is the drive locked? And HOW to work arround it other than to reboot the system? Can't a forced umount be implemented for other cases than just for NFS (as manpage sais)? Or is my system just too old and buggy? (because it is, besides from updates) And yes: It's more than once this happened: # umount /mnt/toaster umount: /mnt/toaster: device is busy # fuser -v -m /mnt/toaster/ # mount | grep toaster /dev/scd0 on /mnt/toaster type iso9660 (ro,noexec,...) # lsof | grep -e scd0 -e toaster # umount /mnt/toaster umount: /mnt/toaster: device is busy # umount -f /mnt/toaster umount2: Device or resource busy umount: /dev/scd0: not mounted umount: /mnt/toaster: Illegal seek # umount /dev/scd0 || umount -f /dev/scd0 umount: /mnt/toaster: device is busy umount2: Device or resource busy umount: /dev/scd0: not mounted umount: /mnt/toaster: Illegal seek # umount -V umount: mount-2.10m # fuser -V fuser from psmisc version 18 # Jim, Linux uses the "prevent allow medium removal" MMC command to effectively lock the medium (disc) in the drive while a file system on it is mounted. The eject linux command tries to unmount any file systems before unlocking and ejecting the disc. If the unmount fails (e.g. "Device or resource busy) then it won't unlock the drive. Perhaps eject has/should_have an option to bypass the unmount when it fails. The lsof command may help you find which application has a file open and therefore inhibiting the unmount. If that doesn't work then fetch the sg3_utils package and the sg_prevent utility in there may be of interest. Assuming your cd/dvd drive is /dev/sg0 then this should eject your drive in lk 2.4 : sg_prevent --prevent=0 /dev/sg0 sg_start -loej /dev/sg0 In the lk 2.6 series the actual device name could be used (e.g. /dev/hdd rather than /dev/sg0). Soon I will release sdparm 0.94 which adds some commands. The sequence to unlock then eject would be: sdparm -C unlock /dev/hdd sdparm -C eject /dev/hdd BTW After the unlock operation is successful the eject button on the drive should work. 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: [PATCH 22/82] remove linux/version.h from drivers/message/fus ion
On Tue, Jul 19, 2005 at 06:07:41PM -0600, Moore, Eric Dean wrote: > On Tuesday, July 12, 2005 8:17 PM, Matt Domsch wrote: > > In general, this construct: > > > > > > -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,6)) > > > > -static int inline scsi_device_online(struct scsi_device *sdev) > > > > -{ > > > > - return sdev->online; > > > > -} > > > > -#endif > > > > is better tested as: > > > > #ifndef scsi_device_inline > > static int inline scsi_device_online(struct scsi_device *sdev) > > { > > return sdev->online; > > } > > #endif > > > > when you can. It cleanly eliminates the version test, and tests for > > exactly what you're looking for - is this function defined. > > > > What you illustrated above is not going to work. > If your doing #ifndef around a function, such as scsi_device_online, it's > not going to compile > when scsi_device_online is already implemented in the kernel tree. > The routine scsi_device_online is a function, not a define. For a define > this would work. Sure it does, function names are defined symbols. I'm doing exactly this in my backport of the openipmi drivers to RHEL4 and SLES9. > I'm trying your example around msleep, msleep_interruptible, and > msecs_to_jiffies, and > my code simply won't compile in SLES9 SP2(-191). In SLES9 SP1(-139), these > three routines were not implemented and > your suggestion works. I won't be able to to a linux version check as this > change occurred between service packs > of the 2.6.5 kernel suse tree. Anybody on the linux forums have any ideas? > > Example: > > #ifdef msleep #ifndef you mean. > static void inline msleep(unsigned long msecs) > { > set_current_state(TASK_UNINTERRUPTIBLE); > schedule_timeout(msecs_to_jiffies(msecs) + 1); > } > #endif Thanks, Matt -- Matt Domsch Software Architect Dell Linux Solutions linux.dell.com & www.dell.com/linux Linux on Dell mailing lists @ http://lists.us.dell.com - 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] QLogic SCSI driver Kconfig fixes
The problem in a nutshell is that the tristate `config SCSI_QLA2XXX' does not have a name and thus does not show up in menuconfig and similar. This coupled with the fact that it defaults to `y' when config PCI and config SCSI is selected results in people (like me) who need PCI and SCSI support but have no need of the QLogic drivers end up with the following warnings at build time (and a superfluous kernel .ko file), since there's no way to disable SCSI_QLA2XXX : Building modules, stage 2. MODPOST *** Warning: "request_firmware" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined! *** Warning: "release_firmware" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined! In addition to that, SCSI_QLA2XXX has no help text entry. Below I've included 3 patches to fix the problem in various ways (yes, I know there should only be one patch pr email normally, but it seemed silly to send 3 emails with 3 different suggested patches for the same problem). The third patch is my personal favorite, but I present all 3 to let you choose which one you like best. This patch just adds a name to the option so people can at least deselect it if they don't need it, and it adds a help text. Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]> --- drivers/scsi/qla2xxx/Kconfig |6 +- 1 files changed, 5 insertions(+), 1 deletion(-) --- linux-2.6.13-rc3-mm1-orig/drivers/scsi/qla2xxx/Kconfig 2005-07-17 04:39:52.0 +0200 +++ linux-2.6.13-rc3-mm1/drivers/scsi/qla2xxx/Kconfig 2005-07-20 04:59:47.0 +0200 @@ -1,8 +1,12 @@ config SCSI_QLA2XXX - tristate + tristate "QLogic ISP2XXX SCSI host adapter family support" default (SCSI && PCI) depends on SCSI && PCI select SCSI_FC_ATTRS + ---help--- + Support the QLogic 2XXX (ISP2XXX) family of host bus adapters. + In addition to this option you should select the specific HBAs + you want to support from the submenu items. config SCSI_QLA21XX tristate "QLogic ISP2100 host adapter family support" This patch adds a name to the option so it can be deselected if not needed, adds a help entry and also adds the selection of config FW_LOADER if this option is selected, so it'll build without problems for people who select it without them having to go hunt for config FW_LOADER themselves. Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]> --- drivers/scsi/qla2xxx/Kconfig |7 ++- 1 files changed, 6 insertions(+), 1 deletion(-) --- linux-2.6.13-rc3-mm1-orig/drivers/scsi/qla2xxx/Kconfig 2005-07-17 04:39:52.0 +0200 +++ linux-2.6.13-rc3-mm1/drivers/scsi/qla2xxx/Kconfig 2005-07-20 05:00:57.0 +0200 @@ -1,8 +1,13 @@ config SCSI_QLA2XXX - tristate + tristate "QLogic ISP2XXX SCSI host adapter family support" default (SCSI && PCI) depends on SCSI && PCI select SCSI_FC_ATTRS + select FW_LOADER + ---help--- + Support the QLogic 2XXX (ISP2XXX) family of host bus adapters. + In addition to this option you should select the specific HBAs + you want to support from the submenu items. config SCSI_QLA21XX tristate "QLogic ISP2100 host adapter family support" This patch adds a name to the option so it can be deselected if not needed, it also adds a help text and selection of config FW_LOADER if this option is selected, so it'll build without problems for people who select it without them having to go hunt for config FW_LOADER themselves, and finally it makes the option default to `n' since I don't see a point in having any specific SCSI drivers be default enabled - surely people who actually need the option can select it by themselves (especially now that it'll cause the automatic selection of FW_LOADER). Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]> --- drivers/scsi/qla2xxx/Kconfig |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) --- linux-2.6.13-rc3-mm1-orig/drivers/scsi/qla2xxx/Kconfig 2005-07-17 04:39:52.0 +0200 +++ linux-2.6.13-rc3-mm1/drivers/scsi/qla2xxx/Kconfig 2005-07-20 05:02:50.0 +0200 @@ -1,8 +1,13 @@ config SCSI_QLA2XXX - tristate - default (SCSI && PCI) + tristate "QLogic ISP2XXX SCSI host adapter family support" + default n depends on SCSI && PCI select SCSI_FC_ATTRS + select FW_LOADER + ---help--- + Support the QLogic 2XXX (ISP2XXX) family of host bus adapters. + In addition to this option you should select the specific HBAs + you want to support from the submenu items. config SCSI_QLA21XX tristate "QLogic ISP2100 host adapter family support" Feel free to pick the patch you believe fix the problem best. :-) Kind regards, Jesper Juhl <[EMAIL PROTECTED]> PS. Please keep me on CC if you do not reply directly to me or to linux-kernel, since I'm not subscribed to linux-scsi. - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in t
Re: changes to ieee1394/sbp2 outside of linux1394.org
Hi, all. On Jul 18 2005, Rogério Brito wrote: > On Jul 18 2005, Philipp Slusallek wrote: > > I though everyone would notice it: There is an "S" missing in the > > rbc-disk line from Rogerio's scsi.agent file. > > Good catch! I am now going to bed, but I will change that and test it as > soon as I wake up. I will report back the results that I get. Just reporting what I promised, indeed, the missing "S" in the scsi.agent script was enough to make everything work with the linux1394 trunk. Now, with the patched scsi.agent, the sd_mod actually gets loaded when I plug the device. Thank you very much, Rogério. -- Rogério Brito : [EMAIL PROTECTED] : http://www.ime.usp.br/~rbrito Homepage of the algorithms package : http://algorithms.berlios.de Homepage on freshmeat: http://freshmeat.net/projects/algorithms/ - 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: [PATCH 22/82] remove linux/version.h from drivers/message/fus ion
On Tuesday, July 12, 2005 8:17 PM, Matt Domsch wrote: > In general, this construct: > > > > -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,6)) > > > -static int inline scsi_device_online(struct scsi_device *sdev) > > > -{ > > > - return sdev->online; > > > -} > > > -#endif > > is better tested as: > > #ifndef scsi_device_inline > static int inline scsi_device_online(struct scsi_device *sdev) > { > return sdev->online; > } > #endif > > when you can. It cleanly eliminates the version test, and tests for > exactly what you're looking for - is this function defined. > What you illustrated above is not going to work. If your doing #ifndef around a function, such as scsi_device_online, it's not going to compile when scsi_device_online is already implemented in the kernel tree. The routine scsi_device_online is a function, not a define. For a define this would work. I'm trying your example around msleep, msleep_interruptible, and msecs_to_jiffies, and my code simply won't compile in SLES9 SP2(-191). In SLES9 SP1(-139), these three routines were not implemented and your suggestion works. I won't be able to to a linux version check as this change occurred between service packs of the 2.6.5 kernel suse tree. Anybody on the linux forums have any ideas? Example: #ifdef msleep static void inline msleep(unsigned long msecs) { set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(msecs_to_jiffies(msecs) + 1); } #endif - 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
Kernel 2.4.26 cannot umount CD: device or resource busy (n o fuser)
Symptom: Cannot umount a CD-Rom in my CD-Roaster/Burner/Toaster whatever Reason to write to ide AND Scsi-List: Its an IDE - Drive, but with scsi-emulation running. So my 4 questions: WHY is the drive locked? And HOW to work arround it other than to reboot the system? Can't a forced umount be implemented for other cases than just for NFS (as manpage sais)? Or is my system just too old and buggy? (because it is, besides from updates) And yes: It's more than once this happened: # umount /mnt/toaster umount: /mnt/toaster: device is busy # fuser -v -m /mnt/toaster/ # mount | grep toaster /dev/scd0 on /mnt/toaster type iso9660 (ro,noexec,...) # lsof | grep -e scd0 -e toaster # umount /mnt/toaster umount: /mnt/toaster: device is busy # umount -f /mnt/toaster umount2: Device or resource busy umount: /dev/scd0: not mounted umount: /mnt/toaster: Illegal seek # umount /dev/scd0 || umount -f /dev/scd0 umount: /mnt/toaster: device is busy umount2: Device or resource busy umount: /dev/scd0: not mounted umount: /mnt/toaster: Illegal seek # umount -V umount: mount-2.10m # fuser -V fuser from psmisc version 18 # -- Greetings, Jim -- Gruss, Jim - 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] aic byteorder fixes after recent cleanup
aic doesnt work anymore after this change which appeared int 2.6.13-rc1: [SCSI] aic7xxx/aic79xx: remove useless byte order macro cruft 2 files did not include byteorder.h, aic died with panic "Unknown opcode encountered in seq program" This patch fixes it for me. SCSI subsystem initialized scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36 aic7890/91: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs Vendor: IBM Model: DDRS-39130D Rev: DC2A Type: Direct-Access ANSI SCSI revision: 02 target0:0:0: asynchronous. scsi0:A:0:0: Tagged Queuing enabled. Depth 32 target0:0:0: Beginning Domain Validation target0:0:0: wide asynchronous. target0:0:0: Domain Validation skipping write tests target0:0:0: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 15) target0:0:0: Ending Domain Validation SCSI device sda: 1785 512-byte hdwr sectors (9139 MB) SCSI device sda: drive cache: write back SCSI device sda: 1785 512-byte hdwr sectors (9139 MB) SCSI device sda: drive cache: write back sda: [mac] sda1 sda2 sda3 sda4 sda5 sda6 Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 Vendor: IBM Model: DNES-318350W Rev: SA30 Type: Direct-Access ANSI SCSI revision: 03 target0:0:2: asynchronous. scsi0:A:2:0: Tagged Queuing enabled. Depth 32 target0:0:2: Beginning Domain Validation target0:0:2: wide asynchronous. target0:0:2: Domain Validation skipping write tests target0:0:2: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 31) target0:0:2: Ending Domain Validation SCSI device sdb: 35843670 512-byte hdwr sectors (18352 MB) SCSI device sdb: drive cache: write back SCSI device sdb: 35843670 512-byte hdwr sectors (18352 MB) SCSI device sdb: drive cache: write back sdb: [mac] sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 Attached scsi disk sdb at scsi0, channel 0, id 2, lun 0 Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/aic7xxx/aicasm/aicasm.c |4 ++-- drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h |8 +--- 2 files changed, 7 insertions(+), 5 deletions(-) Index: linux-2.6.12.aic-fixing/drivers/scsi/aic7xxx/aicasm/aicasm.c === --- linux-2.6.12.aic-fixing.orig/drivers/scsi/aic7xxx/aicasm/aicasm.c +++ linux-2.6.12.aic-fixing/drivers/scsi/aic7xxx/aicasm/aicasm.c @@ -369,7 +369,7 @@ output_code() fprintf(ofile, "%s\t0x%02x, 0x%02x, 0x%02x, 0x%02x", cur_instr == STAILQ_FIRST(&seq_program) ? "" : ",\n", -#if BYTE_ORDER == LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN cur_instr->format.bytes[0], cur_instr->format.bytes[1], cur_instr->format.bytes[2], @@ -613,7 +613,7 @@ output_listing(char *ifilename) line++; } fprintf(listfile, "%03x %02x%02x%02x%02x", instrptr, -#if BYTE_ORDER == LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN cur_instr->format.bytes[0], cur_instr->format.bytes[1], cur_instr->format.bytes[2], Index: linux-2.6.12.aic-fixing/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h === --- linux-2.6.12.aic-fixing.orig/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h +++ linux-2.6.12.aic-fixing/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h @@ -42,8 +42,10 @@ * $FreeBSD$ */ +#include + struct ins_format1 { -#if BYTE_ORDER == LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN uint32_timmediate : 8, source : 9, destination : 9, @@ -61,7 +63,7 @@ struct ins_format1 { }; struct ins_format2 { -#if BYTE_ORDER == LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN uint32_tshift_control : 8, source : 9, destination : 9, @@ -79,7 +81,7 @@ struct ins_format2 { }; struct ins_format3 { -#if BYTE_ORDER == LITTLE_ENDIAN +#ifdef __LITTLE_ENDIAN uint32_timmediate : 8, source : 9, address : 10, - 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
[-mm patch] SCSI_QLA2ABC options must select FW_LOADER
[ The subject was adapted to linux-kernel spam filters... ] On Sat, Jul 16, 2005 at 07:26:44PM +0200, Jindrich Makovicka wrote: > Andrew Vasquez wrote: > > Yes, quite. How about the following to correct the intention. > > > > > > > > Add correct Kconfig option for ISP24xx support. > > > > Signed-off-by: Andrew Vasquez <[EMAIL PROTECTED]> > > --- > > > > diff --git a/drivers/scsi/qla2xxx/Kconfig b/drivers/scsi/qla2xxx/Kconfig > > --- a/drivers/scsi/qla2xxx/Kconfig > > +++ b/drivers/scsi/qla2xxx/Kconfig > > @@ -39,3 +39,11 @@ config SCSI_QLA6312 > > ---help--- > > This driver supports the QLogic 63xx (ISP6312 and ISP6322) host > > adapter family. > > + > > +config SCSI_QLA24XX > > + tristate "QLogic ISP24xx host adapter family support" > > + depends on SCSI_QLA2XXX > > +select SCSI_FC_ATTRS > > there should be also "select FW_LOADER", as it uses request_firmware & > release_firmware >... You are right, patch below. > Jindrich Makovicka cu Adrian <-- snip --> qla_init.c now uses code that requires FW_LOADER. Additionally, this patch removes spaces instead of tabs at the SCSI_FC_ATTRS selects. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- linux-2.6.13-rc3-mm1-full/drivers/scsi/qla2xxx/Kconfig.old 2005-07-17 15:44:26.0 +0200 +++ linux-2.6.13-rc3-mm1-full/drivers/scsi/qla2xxx/Kconfig 2005-07-17 15:45:45.0 +0200 @@ -1,49 +1,55 @@ config SCSI_QLA2XXX tristate depends on SCSI && PCI default y config SCSI_QLA21XX tristate "QLogic ISP2100 host adapter family support" depends on SCSI_QLA2XXX -select SCSI_FC_ATTRS + select SCSI_FC_ATTRS + select FW_LOADER ---help--- This driver supports the QLogic 21xx (ISP2100) host adapter family. config SCSI_QLA22XX tristate "QLogic ISP2200 host adapter family support" depends on SCSI_QLA2XXX -select SCSI_FC_ATTRS + select SCSI_FC_ATTRS + select FW_LOADER ---help--- This driver supports the QLogic 22xx (ISP2200) host adapter family. config SCSI_QLA2300 tristate "QLogic ISP2300 host adapter family support" depends on SCSI_QLA2XXX -select SCSI_FC_ATTRS + select SCSI_FC_ATTRS + select FW_LOADER ---help--- This driver supports the QLogic 2300 (ISP2300 and ISP2312) host adapter family. config SCSI_QLA2322 tristate "QLogic ISP2322 host adapter family support" depends on SCSI_QLA2XXX -select SCSI_FC_ATTRS + select SCSI_FC_ATTRS + select FW_LOADER ---help--- This driver supports the QLogic 2322 (ISP2322) host adapter family. config SCSI_QLA6312 tristate "QLogic ISP63xx host adapter family support" depends on SCSI_QLA2XXX -select SCSI_FC_ATTRS + select SCSI_FC_ATTRS + select FW_LOADER ---help--- This driver supports the QLogic 63xx (ISP6312 and ISP6322) host adapter family. config SCSI_QLA24XX tristate "QLogic ISP24xx host adapter family support" depends on SCSI_QLA2XXX -select SCSI_FC_ATTRS + select SCSI_FC_ATTRS + select FW_LOADER ---help--- This driver supports the QLogic 24xx (ISP2422 and ISP2432) host adapter family. - 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