Re: [PATCH v3] storvsc: use small sg_tablesize on x86
On Thu, Jun 09, James Bottomley wrote: > On Thu, 2016-06-09 at 18:25 +0200, Olaf Hering wrote: > > Reducing the sg_tablesize allows booting of 32bit kernels in VMs, > > after > > commit be0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6 ("scsi: storvsc: Set > > the > > tablesize based on the information given by the host") > > > > [5.567138] hv_storvsc vmbus_1: adjusting sg_tablesize 0x800 -> > > 0x20 > > Are you really sure 32 is the correct size? Its a size that works, while the current state does not work at all. > I know 32 it what it had before, but the reason for the commit you > quote was to improve performance ... The commit above broke 32bit. Whoever wants to improve performance on this dead horse can submit another patch. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] storvsc: use small sg_tablesize on x86
Reducing the sg_tablesize allows booting of 32bit kernels in VMs, after commit be0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6 ("scsi: storvsc: Set the tablesize based on the information given by the host") [5.567138] hv_storvsc vmbus_1: adjusting sg_tablesize 0x800 -> 0x20 Signed-off-by: Olaf Hering --- As requested, use CONFIG_. For some reason IS_ENABLED(64_BIT) does not work. drivers/scsi/storvsc_drv.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 3ddcabb..ae42324 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1673,11 +1673,15 @@ static int storvsc_probe(struct hv_device *device, /* max cmd length */ host->max_cmd_len = STORVSC_MAX_CMD_LEN; +#ifdef CONFIG_64BIT /* * set the table size based on the info we got * from the host. */ host->sg_tablesize = (stor_device->max_transfer_bytes >> PAGE_SHIFT); +#else + host->sg_tablesize = MAX_MULTIPAGE_BUFFER_COUNT; +#endif /* Register the HBA and start the scsi bus scan */ ret = scsi_add_host(host, &device->device); -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] storvsc: use small sg_tablesize on x86
On Mon, May 16, Joseph Salisbury wrote: > > CONFIG_64BIT=y > It doesn't appear this patch ever landed in Mainline. Olaf, do you have > plans to submit this patch? Yes, will do. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] scsi: storvsc: Fix a build issue reported by kbuild test robot
On Wed, Jan 27, K. Y. Srinivasan wrote: > + depends on SCSI_FC_ATTRS I think 'depends' instead of 'select' will cause HYPERV_STORAGE to disapepar during make oldconfig if SCSI_FC_ATTRS was not set before. Not sure what the policy of 'depends' vs. 'select' actually is. If SCSI_FC_ATTRS is supposed to be a library kind of thing then 'select' might be the correct way. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] storvsc: use small sg_tablesize on x86
On Wed, Jan 27, James Bottomley wrote: > It's not really architecture independent, is it? Just use the bit > width config. Again: which one? This driver is not for mips|powerpc|score|sh. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] storvsc: use small sg_tablesize on x86
On Fri, Oct 02, Olaf Hering wrote: > On Thu, Oct 01, James Bottomley wrote: > > > On Thu, 2015-10-01 at 20:30 +, KY Srinivasan wrote: > > > > > +#if defined(CONFIG_X86_32) > > > Um, this is a bit architecture specific (I know Azure is x86, but > > still). Can you make the define check CONFIG_32BIT rather than > > CONFIG_X86_32? > > According to arch/x86/Kconfig there is no such thing. What is the status of this change? Looks like there is nothing more to do on my side. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] storvsc: use small sg_tablesize on x86
On Thu, Oct 01, James Bottomley wrote: > On Thu, 2015-10-01 at 20:30 +, KY Srinivasan wrote: > > > +#if defined(CONFIG_X86_32) > Um, this is a bit architecture specific (I know Azure is x86, but > still). Can you make the define check CONFIG_32BIT rather than > CONFIG_X86_32? According to arch/x86/Kconfig there is no such thing. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] storvsc: use small sg_tablesize on x86
Reducing the sg_tablesize allows booting of 32bit kernels in VMs, after commit be0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6 ("scsi: storvsc: Set the tablesize based on the information given by the host") [5.567138] hv_storvsc vmbus_1: adjusting sg_tablesize 0x800 -> 0x20 Signed-off-by: Olaf Hering --- drivers/scsi/storvsc_drv.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 40c43ae..36bf183 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1907,6 +1907,11 @@ static int storvsc_probe(struct hv_device *device, * from the host. */ host->sg_tablesize = (stor_device->max_transfer_bytes >> PAGE_SHIFT); +#if defined(CONFIG_X86_32) + dev_warn(&device->device, "adjusting sg_tablesize 0x%x -> 0x%x", + host->sg_tablesize, MAX_MULTIPAGE_BUFFER_COUNT); + host->sg_tablesize = MAX_MULTIPAGE_BUFFER_COUNT; +#endif /* Register the HBA and start the scsi bus scan */ ret = scsi_add_host(host, &device->device); -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 6/7] scsi: storvsc: Don't assume that the scatterlist is not chained
On Mon, Mar 23, K. Y. Srinivasan wrote: > @@ -653,32 +640,39 @@ static unsigned int copy_from_bounce_buffer(struct > scatterlist *orig_sgl, > unsigned long bounce_addr = 0; > unsigned long dest_addr = 0; > unsigned long flags; > + struct scatterlist *cur_dest_sgl; > + struct scatterlist *cur_src_sgl; > > local_irq_save(flags); > - > + cur_dest_sgl = orig_sgl; > + cur_src_sgl = bounce_sgl; > for (i = 0; i < orig_sgl_count; i++) { > - dest_addr = sg_kmap_atomic(orig_sgl,i) + orig_sgl[i].offset; > + dest_addr = (unsigned long) > + kmap_atomic(sg_page(cur_dest_sgl)) + > + cur_dest_sgl->offset; > dest = dest_addr; > destlen = orig_sgl[i].length; > + destlen = cur_dest_sgl->length; Double assignment. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: use dedicated storage for scsi_debug LUNs
On Fri, Mar 06, Martin K. Petersen wrote: > >>>>> "Olaf" == Olaf Hering writes: > Olaf> Does that target code offer what scsi_debug offers, a bunch of > Olaf> stuff listable with 'lsscsi'? The latter can be passed to > Olaf> backstores/pscsi. > Yes. Indeed, with /backstores/fileio/ and /loopback/. It would be nice if one could specify a fixed identifier for each fileio during creation. Right now the symlinks in /dev/disk/by-*/* are all random. Its not easily possible to map file_or_dev=$file to the resulting SCSI device. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: noise in target_core_register_fabric
On Wed, Mar 04, Olaf Hering wrote: > Is there a need to fill dmesg with noise like shown below whenever > targetcli-3.0 runs a command? I think the pr_err calls in those functions > should be converted to pr_debug. Any update on this? > [ 1240.045518] target_core_register_fabric() trying autoload for fc > [ 1240.045520] target_core_get_fabric() failed for fc Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] storvsc: use KBUILD_MODNAME to fill .proc_name
Since the previous patch ead3700d893654d440edcb66fb3767a0c0db54cf ("storvsc: use cmd_size to allocate per-command data") fills .proc_name now anyway give it a usable content for v4.0. Old mkinitrd in SLES makes use of this variable to find the required storage driver. Signed-off-by: Olaf Hering --- This should go into v4.0 because ead3700d893654d440edcb66fb3767a0c0db54cf is in v4.0-rc1. drivers/scsi/storvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index efc6e44..458e3d4 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1642,7 +1642,7 @@ static struct scsi_host_template scsi_driver = { .bios_param = storvsc_get_chs, .queuecommand = storvsc_queuecommand, .eh_host_reset_handler =storvsc_host_reset_handler, - .proc_name ="storvsc_host", + .proc_name =KBUILD_MODNAME, .eh_timed_out = storvsc_eh_timed_out, .slave_configure = storvsc_device_configure, .cmd_per_lun = 255, -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] SCSI:STORVSC Use SCSI layer to allocate memory for per-command device request data
On Tue, Mar 10, Christoph Hellwig wrote: > On Tue, Mar 10, 2015 at 12:42:33PM +0100, Olaf Hering wrote: > > It would be nice to change .proc_name to KBUILD_MODNAME before v4.0 is > > released. We carry a patch which adds this field. Of cource we can just > > change the patch, but if code gets touched upstream anyway... > > Please send a patch. Would be nice if you had sent it long go insted of just > including it in a vendor tree.. I was told .procname was dead, but since the patch adds it anyway it should have a content thats in use (by us). Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] SCSI:STORVSC Use SCSI layer to allocate memory for per-command device request data
On Mon, Dec 29, Christoph Hellwig wrote: > +++ b/drivers/scsi/storvsc_drv.c > static struct scsi_host_template scsi_driver = { > .module = THIS_MODULE, > .name = "storvsc_host_t", > + .cmd_size = sizeof(struct storvsc_cmd_request), > .bios_param = storvsc_get_chs, > .queuecommand = storvsc_queuecommand, > .eh_host_reset_handler =storvsc_host_reset_handler, > + .proc_name ="storvsc_host", It would be nice to change .proc_name to KBUILD_MODNAME before v4.0 is released. We carry a patch which adds this field. Of cource we can just change the patch, but if code gets touched upstream anyway... Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: use dedicated storage for scsi_debug LUNs
On Fri, Mar 06, Martin K. Petersen wrote: > I agree with Doug. The target code is much more comprehensive than > scsi_debug. You can set up file/disk/ram-backed SCSI LUNs on your > machine without the need for any hardware . Does that target code offer what scsi_debug offers, a bunch of stuff listable with 'lsscsi'? The latter can be passed to backstores/pscsi. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: use dedicated storage for scsi_debug LUNs
On Thu, Mar 05, Douglas Gilbert wrote: > So it is possible. The stock answer has typically been that > you should probably be using the target subsystem for that. > Thoughts? Is the target subsystem capable of stacking? What I need for xen-scsiback is a bunch of true SCSI devices. Due to lack of hardware, scsi_debug looks like the obvious choice. I will see if I can come up with a patch. Thanks for your input. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
use dedicated storage for scsi_debug LUNs
I'm using scsi_debug to implement and test tools for xen-scsiback. Today I discovered that each LUN uses the very same storage, as described in the docs. What would it take to optionally use dedicated storage for each LUN? This is how I load scsi_debug: modprobe scsi_debug add_host=4 dev_size_mb=4 max_luns=4 num_parts=4 num_tgts=4 vpd_use_hostno=1 Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
noise in target_core_register_fabric
Is there a need to fill dmesg with noise like shown below whenever targetcli-3.0 runs a command? I think the pr_err calls in those functions should be converted to pr_debug. Olaf . [ 1240.045518] target_core_register_fabric() trying autoload for fc [ 1240.045520] target_core_get_fabric() failed for fc [ 1240.045926] target_core_register_fabric() trying autoload for usb_gadget [ 1240.045928] target_core_get_fabric() failed for usb_gadget [ 1240.046236] target_core_register_fabric() trying autoload for vhost [ 1240.046238] target_core_get_fabric() failed for vhost [ 1240.062569] target_core_register_fabric() trying autoload for srpt [ 1240.062571] target_core_get_fabric() failed for srpt [ 1240.069610] target_core_register_fabric() trying autoload for qla2xxx [ 1240.069613] target_core_get_fabric() failed for qla2xxx [ 1240.076049] target_core_register_fabric() trying autoload for fc [ 1240.076051] target_core_get_fabric() failed for fc [ 1240.076465] target_core_register_fabric() trying autoload for usb_gadget [ 1240.076467] target_core_get_fabric() failed for usb_gadget [ 1240.076770] target_core_register_fabric() trying autoload for vhost [ 1240.076772] target_core_get_fabric() failed for vhost [ 1240.088177] target_core_register_fabric() trying autoload for srpt [ 1240.088179] target_core_get_fabric() failed for srpt [ 1240.097338] target_core_register_fabric() trying autoload for qla2xxx [ 1240.097340] target_core_get_fabric() failed for qla2xxx [ 1240.104335] target_core_register_fabric() trying autoload for fc [ 1240.104338] target_core_get_fabric() failed for fc [ 1240.104801] target_core_register_fabric() trying autoload for usb_gadget [ 1240.104803] target_core_get_fabric() failed for usb_gadget [ 1240.105182] target_core_register_fabric() trying autoload for vhost [ 1240.105184] target_core_get_fabric() failed for vhost [ 1240.237564] target_core_register_fabric() trying autoload for srpt [ 1240.237567] target_core_get_fabric() failed for srpt [ 1240.246394] target_core_register_fabric() trying autoload for qla2xxx [ 1240.246396] target_core_get_fabric() failed for qla2xxx [ 1240.252862] target_core_register_fabric() trying autoload for fc [ 1240.252864] target_core_get_fabric() failed for fc [ 1240.253303] target_core_register_fabric() trying autoload for usb_gadget [ 1240.253305] target_core_get_fabric() failed for usb_gadget [ 1240.253597] target_core_register_fabric() trying autoload for vhost [ 1240.253599] target_core_get_fabric() failed for vhost [ 1240.270028] target_core_register_fabric() trying autoload for srpt [ 1240.270030] target_core_get_fabric() failed for srpt [ 1240.277044] target_core_register_fabric() trying autoload for qla2xxx [ 1240.277046] target_core_get_fabric() failed for qla2xxx [ 1240.283666] target_core_register_fabric() trying autoload for fc [ 1240.283669] target_core_get_fabric() failed for fc [ 1240.284102] target_core_register_fabric() trying autoload for usb_gadget [ 1240.284104] target_core_get_fabric() failed for usb_gadget -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: crash in pscsi_get_device_type
On Fri, Feb 27, Nicholas A. Bellinger wrote: > On Thu, 2015-02-26 at 10:26 +0100, Olaf Hering wrote: > > [ 145.661468] IP: [] pscsi_get_device_type+0xb/0x20 > > [target_core_pscsi] > Looks like a PSCSI specific NULL pointer dereference when reading the > dev_type attribute if a backend device was not able to be successfully > configured -> enabled. > > Here's a quick patch to address this case. Please confirm on your end. Unfortunately I can not reproduce it anymore. Maybe it depends on the .config? Olaf > diff --git a/drivers/target/target_core_pscsi.c > b/drivers/target/target_core_pscsi.c > index 1045dcd..f6c954c 100644 > --- a/drivers/target/target_core_pscsi.c > +++ b/drivers/target/target_core_pscsi.c > @@ -1121,7 +1121,7 @@ static u32 pscsi_get_device_type(struct se_device *dev) > struct pscsi_dev_virt *pdv = PSCSI_DEV(dev); > struct scsi_device *sd = pdv->pdv_sd; > > - return sd->type; > + return (sd) ? sd->type : TYPE_NO_LUN; > } > > static sector_t pscsi_get_blocks(struct se_device *dev) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
crash in pscsi_get_device_type
While attempting to understand the Xen scsi backend driver I got this crash using the script shown below: [ 145.495887] Rounding down aligned max_sectors from 4294967295 to 4294967288 [ 145.554864] Unable to load target_core_user [ 145.661446] BUG: unable to handle kernel NULL pointer dereference at 00a8 [ 145.661468] IP: [] pscsi_get_device_type+0xb/0x20 [target_core_pscsi] [ 145.661475] PGD 64121a067 PUD 6427e1067 PMD 0 [ 145.661479] Oops: [#1] SMP [ 145.661482] Modules linked in: target_core_pscsi target_core_file target_core_iblock xen_scsiback target_core_mod bridge stp llc loop ipv6 usb_storage tpm_tis i2c_i801 joydev tpm xen_blkfront xen_netfront mptsas mptscsih mptbase scsi_transport_sas [ 145.661503] CPU: 6 PID: 5930 Comm: cat Not tainted 3.19.0-1.olh.4-kernel-linux-3_19 #1 [ 145.661507] Hardware name: Intel Corporation S5520UR/S5520UR, BIOS S5500.86B.01.00.0050.050620101605 05/06/2010 [ 145.661512] task: 88063b8f0760 ti: 88063d74 task.ti: 88063d74 [ 145.661515] RIP: e030:[] [] pscsi_get_device_type+0xb/0x20 [target_core_pscsi] [ 145.661521] RSP: e02b:88063d743e48 EFLAGS: 00010292 [ 145.661524] RAX: RBX: 8800080b9000 RCX: 88000809a5a8 [ 145.661527] RDX: 8800080b9000 RSI: 8800080b9000 RDI: 88000809a000 [ 145.661530] RBP: 88063d743e48 R08: a01fd390 R09: [ 145.661533] R10: R11: 0100 R12: 880641e7b1e0 [ 145.661536] R13: a020ed40 R14: a020fc20 R15: 88000809a6f8 [ 145.661543] FS: 7f8e447a5700() GS:88064b78() knlGS: [ 145.661546] CS: e033 DS: ES: CR0: 8005003b [ 145.661549] CR2: 00a8 CR3: 00063d753000 CR4: 2660 [ 145.661552] Stack: [ 145.661554] 88063d743e68 a01fd3b0 88063d743e68 fff4 [ 145.661559] 88063d743e78 a01fcd48 88063d743ed8 811a90a5 [ 145.661563] 2c495760 88063d743f48 8000 0060d000 [ 145.661568] Call Trace: [ 145.661579] [] target_stat_scsi_lu_show_attr_dev_type+0x20/0x50 [target_core_mod] [ 145.661586] [] target_stat_scsi_lu_attr_show+0x28/0x30 [target_core_mod] [ 145.661593] [] configfs_read_file+0x75/0x110 [ 145.661598] [] __vfs_read+0x13/0x60 [ 145.661602] [] vfs_read+0xae/0x120 [ 145.661606] [] SyS_read+0x54/0xb0 [ 145.661611] [] system_call_fastpath+0x12/0x17 [ 145.661614] Code: 0f 84 22 ff ff ff 80 fa 2a 0f 1f 80 00 00 00 00 0f 85 16 ff ff ff 66 90 e9 0b ff ff ff 0f 1f 00 48 8b 87 90 0e 00 00 55 48 89 e5 <0f> be 80 a8 00 00 00 c9 c3 66 66 66 2e 0f 1f 84 00 00 00 00 00 [ 145.661648] RIP [] pscsi_get_device_type+0xb/0x20 [target_core_pscsi] [ 145.661653] RSP [ 145.661655] CR2: 00a8 [ 145.661658] ---[ end trace 73b5dd612a58996d ]--- root@satriani:~ # : bash -xv t.sh /dev/disk/by-id/usb-TEAC_DV-W28S-V_0033-0\:0 #!/bin/bash # usage: # mkpvscsi device # e.g. mkpvscsi /dev/sr0 unset LANG + unset LANG unset ${!LC_*} + unset LC_COLLATE DEV=$1 + DEV=/dev/disk/by-id/usb-TEAC_DV-W28S-V_0033-0:0 gen_uuid() { cat /proc/sys/kernel/random/uuid | \ awk '{print "naa.6001405" substr($1,1,8) substr($1,10,1);}' } stat_dev() { local type=$1 local d=$2 local mm local path mm=$(( `stat -L -c 0x%t "$d"` )):$(( `stat -L -c 0x%T "$d"` )) if test -z "$mm" then exit 1 fi path=`set -e ; cd /sys/dev/$type/$mm/device/scsi_device ; ls -d *:*:*:*` if test -z "$path" then exit 1 fi NODE=$path } if test -c "$DEV" then stat_dev char "$DEV" elif test -b "$DEV" then stat_dev block "$DEV" else exit 1 fi + test -c /dev/disk/by-id/usb-TEAC_DV-W28S-V_0033-0:0 + test -b /dev/disk/by-id/usb-TEAC_DV-W28S-V_0033-0:0 + stat_dev block /dev/disk/by-id/usb-TEAC_DV-W28S-V_0033-0:0 + local type=block + local d=/dev/disk/by-id/usb-TEAC_DV-W28S-V_0033-0:0 + local mm + local path stat -L -c 0x%t "$d" ++ stat -L -c 0x%t /dev/disk/by-id/usb-TEAC_DV-W28S-V_0033-0:0 stat -L -c 0x%T "$d" ++ stat -L -c 0x%T /dev/disk/by-id/usb-TEAC_DV-W28S-V_0033-0:0 + mm=11:0 + test -z 11:0 set -e ; cd /sys/dev/$type/$mm/device/scsi_device ; ls -d *:*:*:* ++ set -e ++ cd /sys/dev/block/11:0/device/scsi_device ++ ls -d 7:0:0:0 + path=7:0:0:0 + test -z 7:0:0:0 + NODE=7:0:0:0 TARG=`gen_uuid` gen_uuid ++ gen_uuid ++ cat /proc/sys/kernel/random/uuid ++ awk '{print "naa.6001405" substr($1,1,8) substr($1,10,1);}' + TARG=naa.600140595883158a INIT=`gen_uuid` gen_uuid ++ gen_uuid ++ cat /proc/sys/kernel/random/uuid ++ awk '{print "naa.6001405" substr($1,1,8) substr($1,10,1);}' + INIT=naa.600140555b779033 NAME=`echo $NODE | sed 's/:/_/g'` echo $NODE | sed 's/:/_/g' ++ echo 7:0:0:0 ++ sed s/:/_/g + NAME=7_0_0_0 modp
Re: [PATCH 1/1] Drivers: scsi: storvsc: Get rid of warning messages
On Tue, Sep 02, K. Y. Srinivasan wrote: > Get rid of the warning messages since they will clutter up various system logs > and are of questionable value to the end user. For debugging purposes, this > information can be gotten by setting the scsi log level appropriately. > > Signed-off-by: K. Y. Srinivasan Reviewed-by: Olaf Hering -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] Drivers: scsi: storvsc: Get rid of warning messages
On Wed, Sep 17, Christoph Hellwig wrote: > Also the two patches at > http://thread.gmane.org/gmane.linux.drivers.driver-project.devel/56242/ Wasnt the outcome that this was a bad idea? Or at least doing it globally is bad. In any case, its not something I can help with. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] Drivers: scsi: storvsc: Get rid of warning messages
On Mon, Sep 08, KY Srinivasan wrote: > > -Original Message- > > From: Christoph Hellwig [mailto:h...@infradead.org] > > Sent: Thursday, September 4, 2014 10:40 PM > > To: KY Srinivasan > > Subject: Re: [PATCH 1/1] Drivers: scsi: storvsc: Get rid of warning messages > > > > Looks good to me. > > > > Olaf, Hannes - can I get another review for this (and the older hyperv > > scanning patch set)? Christoph, what does "review of this" mean? There are many hv related patches floating around. The removal of the warning in msgid <1409701396-20226-1-git-send-email-...@microsoft.com> looks ok to me. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] scsi: storvsc: avoid usage of WRITE_SAME
James, this patch fixes a regression in 3.8. Please try to include it in final 3.8. There is also another outstanding fix regarding sglist init from KY. Olaf On Wed, Jan 30, Olaf Hering wrote: > Set scsi_device->no_write_same because the host does not support it. > Also blacklist WRITE_SAME to avoid (and log) accident usage. > > If the guest uses the ext4 filesystem, storvsc hangs while it prints > these messages in an endless loop: > drivers/scsi/storvsc_drv.c | 4 > 1 file changed, 4 insertions(+) > + sdevice->no_write_same = 1; -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] scsi: storvsc: avoid usage of WRITE_SAME
Set scsi_device->no_write_same because the host does not support it. Also blacklist WRITE_SAME to avoid (and log) accident usage. If the guest uses the ext4 filesystem, storvsc hangs while it prints these messages in an endless loop: ... [ 161.459523] hv_storvsc vmbus_0_1: cmd 0x41 scsi status 0x2 srb status 0x6 [ 161.462157] sd 2:0:0:0: [sda] [ 161.463135] Sense Key : No Sense [current] [ 161.464983] sd 2:0:0:0: [sda] [ 161.465899] Add. Sense: No additional sense information [ 161.468211] hv_storvsc vmbus_0_1: cmd 0x41 scsi status 0x2 srb status 0x6 [ 161.475766] sd 2:0:0:0: [sda] [ 161.476728] Sense Key : No Sense [current] [ 161.478284] sd 2:0:0:0: [sda] [ 161.479441] Add. Sense: No additional sense information ... This happens with a guest running on Windows Server 2012, but happens to work while running on Windows Server 2008. WRITE_SAME isnt really supported by both versions, so disable the command usage globally. Signed-off-by: Olaf Hering Cc: KY Srinivasan --- drivers/scsi/storvsc_drv.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 0144078..314586c 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1155,6 +1155,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice) blk_queue_bounce_limit(sdevice->request_queue, BLK_BOUNCE_ANY); + sdevice->no_write_same = 1; + return 0; } @@ -1237,6 +1239,8 @@ static bool storvsc_scsi_cmd_ok(struct scsi_cmnd *scmnd) u8 scsi_op = scmnd->cmnd[0]; switch (scsi_op) { + /* the host does not handle WRITE_SAME, log accident usage */ + case WRITE_SAME: /* * smartd sends this command and the host does not handle * this. So, don't send it. -- 1.8.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: storvsc loops with No Sense messages
On Wed, Jan 30, Olaf Hering wrote: > Is there a way to not use WRITE_SAME at all? While browsing the code its > not clear if there is a conditional for this command. It seems scsi_device->no_write_same may avoid this command, I will test this patch: # Subject: [PATCH] scsi: storvsc: avoid usage of WRITE_SAME Set scsi_device->no_write_same because the host does not support it. Also blacklist WRITE_SAME to avoid (and log) accident usage. Signed-off-by: Olaf Hering --- drivers/scsi/storvsc_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 0144078..21f788a 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1155,6 +1155,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice) blk_queue_bounce_limit(sdevice->request_queue, BLK_BOUNCE_ANY); + sdevice->no_write_same = 1; + return 0; } @@ -1241,6 +1243,7 @@ static bool storvsc_scsi_cmd_ok(struct scsi_cmnd *scmnd) * smartd sends this command and the host does not handle * this. So, don't send it. */ + case WRITE_SAME: case SET_WINDOW: scmnd->result = ILLEGAL_REQUEST << 16; allowed = false; -- 1.8.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: storvsc loops with No Sense messages
On Tue, Jan 29, Olaf Hering wrote: > On Tue, Jan 29, KY Srinivasan wrote: > > > Was the installation done on a vhd or VHDX. I checked with Hyper-V > > guys and they say they never supported WRITE_SAME. I am wondering how > > it worked on ws2008. > > Its a vhdx image, both fixed and dynamically size have the same issue. > I will see what happens with ws2008, at least the install proceeds > without issues. I see that WRITE_SAME is also used when running on ws2008, but appearently it does not cause any issues. This triggers only when the default ext4 is used, not when I force ext3 for the root filesystem. So to me it looks like ws2012 has issues with WRITE_SAME handling. Is there a way to not use WRITE_SAME at all? While browsing the code its not clear if there is a conditional for this command. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: storvsc loops with No Sense messages
On Tue, Jan 29, KY Srinivasan wrote: > Was the installation done on a vhd or VHDX. I checked with Hyper-V > guys and they say they never supported WRITE_SAME. I am wondering how > it worked on ws2008. Its a vhdx image, both fixed and dynamically size have the same issue. I will see what happens with ws2008, at least the install proceeds without issues. Also the unpatched kernel works fine in the installed system. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: storvsc loops with No Sense messages
On Tue, Jan 29, KY Srinivasan wrote: > I have not seen this. The SRB status indicates it is an illegal request; the > command is WRITE_SAME. I will take a look. I can ignore it like SET_WINDOW, and the installation proceeds. Just a few messages in dmesg: ... [ 107.448281] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: acl,user_xattr [ 111.020383] sd 2:0:0:0: [sda] Unhandled error code [ 111.020913] sd 2:0:0:0: [sda] [ 111.021264] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK [ 111.021791] sd 2:0:0:0: [sda] CDB: [ 111.022186] Write Same(10): 41 00 00 16 e3 a8 00 0f d8 00 [ 111.024400] end_request: I/O error, dev sda, sector 1500072 [ 111.025790] sda2: WRITE SAME failed. Manually zeroing. [ 112.936342] sd 2:0:0:0: [sda] Unhandled error code [ 112.937588] sd 2:0:0:0: [sda] [ 112.938429] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK [ 112.939642] sd 2:0:0:0: [sda] CDB: [ 112.940550] Write Same(10): 41 00 00 16 f3 80 00 0f e0 00 [ 112.945081] end_request: I/O error, dev sda, sector 1504128 [ 112.946627] sda2: WRITE SAME failed. Manually zeroing. [ 113.495880] ISO 9660 Extensions: Microsoft Joliet Level 3 [ 113.498959] ISO 9660 Extensions: RRIP_1991A [ 114.728274] sd 2:0:0:0: [sda] Unhandled error code [ 114.729540] sd 2:0:0:0: [sda] [ 114.730419] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK [ 114.731670] sd 2:0:0:0: [sda] CDB: [ 114.732644] Write Same(10): 41 00 00 17 03 60 00 0f e0 00 [ 114.737219] end_request: I/O error, dev sda, sector 1508192 [ 114.739027] sda2: WRITE SAME failed. Manually zeroing. [ 116.512217] sd 2:0:0:0: [sda] Unhandled error code [ 116.513206] sd 2:0:0:0: [sda] [ 116.513947] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK [ 116.515187] sd 2:0:0:0: [sda] CDB: [ 116.515983] Write Same(10): 41 00 00 17 13 40 00 0f e0 00 [ 116.519547] end_request: I/O error, dev sda, sector 1512256 [ 116.521011] sda2: WRITE SAME failed. Manually zeroing. ... Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
storvsc loops with No Sense messages
KY, while attempting to install the upcoming openSuSE 12.3 in a hyper-v guest (1 vcpu, 512MB) hosted on Windows Server 2012 I see a hanging guest after formating the root partition, when the installer starts to write files to it. After booting the install kernel with 'ignore_loglevel' I see a flood of the "No Sense" messages shown below. I can reproduce it every time with 12.3. The sglist init patch does not fix it for me. Hannes did many storage related backports for SLES11 SP3, and sometimes the installer hangs at similar points during a fresh SP3 install. The same procedure works fine on Windows Server 2008. Any ideas what 2012 does differently? It happens with a plain 3.7.n kernel. I will try 3.8-rc now, and see if it happens as well. Olaf ... [0.00] Linux version 3.7.5-5.home_olh_12_3-vanilla (geeko@buildhost) (gcc version 4.7.2 20130108 [gcc-4_7-branch revision 195012] (SUSE Linux) ) #1 SMP Mon Jan 28 12:39:46 UTC 2013 (d9a9e6d) [0.00] Command line: quiet panic=9 sysrq=yes start_shell splash=silent vga=0x317 video=1024x768 console=ttyS0,115200 console=tty1 ignore_loglevel initrd=sl/12.3/initrd-x86_64 BOOT_IMAGE=sl/12.3/linux-x86_64 ... [7.938806] scsi2 : storvsc_host_t [7.940709] scsi 2:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 4 [7.943952] sd 2:0:0:0: Attached scsi generic sg1 type 0 [7.946440] sd 2:0:0:0: [sda] 20971520 512-byte logical blocks: (10.7 GB/10.0 GiB) [7.949485] sd 2:0:0:0: [sda] Write Protect is off [7.951231] sd 2:0:0:0: [sda] Mode Sense: 0f 00 00 00 [7.953105] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [7.955269] scsi3 : storvsc_host_t [7.957027] scsi scan: INQUIRY result too short (5), using 36 [7.958786] scsi scan: INQUIRY result too short (5), using 36 [7.961292] input: Microsoft Vmbus HID-compliant Mouse as /devices/virtual/input/input3 [7.965400] hid-generic 0006:045E:0621.0001: input: HID v0.01 Mouse [Microsoft Vmbus HID-compliant Mouse] on [7.971872] hv_netvsc: hv_netvsc channel opened successfully [7.974574] hv_netvsc vmbus_0_11: Device MAC 00:15:5d:02:51:02 link state up [7.985086] sda: sda1 sda2 [7.986725] sd 2:0:0:0: [sda] Attached SCSI disk ... [ 156.205185] Adding 746492k swap on /dev/sda1. Priority:-1 extents:1 across:746492k ... [ 156.478186] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: acl,user_xattr [ 161.459523] hv_storvsc vmbus_0_1: cmd 0x41 scsi status 0x2 srb status 0x6 [ 161.462157] sd 2:0:0:0: [sda] [ 161.463135] Sense Key : No Sense [current] [ 161.464983] sd 2:0:0:0: [sda] [ 161.465899] Add. Sense: No additional sense information [ 161.468211] hv_storvsc vmbus_0_1: cmd 0x41 scsi status 0x2 srb status 0x6 [ 161.475766] sd 2:0:0:0: [sda] [ 161.476728] Sense Key : No Sense [current] [ 161.478284] sd 2:0:0:0: [sda] [ 161.479441] Add. Sense: No additional sense information [ 161.481311] hv_storvsc vmbus_0_1: cmd 0x41 scsi status 0x2 srb status 0x6 [ 161.484477] sd 2:0:0:0: [sda] [ 161.485422] Sense Key : No Sense [current] [ 161.486977] sd 2:0:0:0: [sda] [ 161.487920] Add. Sense: No additional sense information ... and so it goes on until the VM is powered off. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: request size limit in scsi tape driver
On Mon, Aug 20, Kai Makisara wrote: > On Mon, 20 Aug 2012, Olaf Hering wrote: > > > > > Currently the st driver does not to break up write requests into smaller > > chunks to satisfy the ->max_hw_sectors limit of the underlying host driver. > > > > # modprobe -v scsi_debug ptype=1 opts=1 dev_size_mb=123 > > # dd if=/dev/zero of=/dev/st0 bs=$((1024*54321)) > > > > This leads to -EBUSY from this call chain: > > st_write -> st_do_scsi -> st_scsi_execute -> blk_rq_map_user > > > > What is the reason for this behaviour? > > Should st_write write in smaller chunks, or would that break real > > hardware because they expect certain block sizes? > > > In variable block mode the write() byte count determines the size of the > tape block. Exactly one SCSI command is used to write one block. This is > why the writes can't be split in variable block mode. In fixed block mode > the writes are split but this results in several tape blocks for each > write(). Thats very unfortunate. Would it be possible in theory to split and reassemble the SCSI commands in backend/frontend to overcome this protocol limit in pvscsi? Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
request size limit in scsi tape driver
Currently the st driver does not to break up write requests into smaller chunks to satisfy the ->max_hw_sectors limit of the underlying host driver. # modprobe -v scsi_debug ptype=1 opts=1 dev_size_mb=123 # dd if=/dev/zero of=/dev/st0 bs=$((1024*54321)) This leads to -EBUSY from this call chain: st_write -> st_do_scsi -> st_scsi_execute -> blk_rq_map_user What is the reason for this behaviour? Should st_write write in smaller chunks, or would that break real hardware because they expect certain block sizes? The specific issue at hand I have is that the (out-of-tree) Xen pvscsi has a ->max_hw_sectors limit of 200, which limits the block size in a guest to 100K. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] scsi/ibmvscsi: add module alias for ibmvscsic
On Mon, Jul 30, Benjamin Herrenschmidt wrote: > On Wed, 2012-07-18 at 18:49 +0200, o...@aepfle.de wrote: > > From: Olaf Hering > > > > The driver is named ibmvscsic, at runtime it its name is advertised as > > ibmvscsi. For this reason mkinitrd wont pickup the driver properly. > > Reported by IBM during SLES11 beta testing: > > > > https://bugzilla.novell.com/show_bug.cgi?id=459933 > > LTC50724 > > So while this would work, I do wonder however whether we could instead > fix it by simplifying the whole thing as follow since iSeries is now > gone and so we don't need split backends anymore: > > scsi/ibmvscsi: Remove backend abstraction I cant that these things myself anymore. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] do not export /usr/include/scsi in make headers_install
On Mon, Aug 06, Christoph Hellwig wrote: > On Mon, Aug 06, 2007 at 02:45:46PM +0200, Olaf Hering wrote: > > > > glibc and make headers_install_all provide /usr/include/scsi > > One of them has to go. > > > > A quick diff shows no differences, expect: > > .. > > > Which copy should be provided by a distributor? > > The glibc one of course. The kernel scsi.h should never have been > added to the list of exportable headers. /usr/include/scsi is provided by glibc. Remove the scsi export from make headers_install target. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> --- include/Kbuild |1 - include/scsi/Kbuild |4 2 files changed, 5 deletions(-) --- a/include/Kbuild +++ b/include/Kbuild @@ -1,6 +1,5 @@ header-y += asm-generic/ header-y += linux/ -header-y += scsi/ header-y += sound/ header-y += mtd/ header-y += rdma/ --- a/include/scsi/Kbuild +++ /dev/null @@ -1,4 +0,0 @@ -header-y += scsi.h - -unifdef-y += scsi_ioctl.h -unifdef-y += sg.h - 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
glibc and make headers_install_all provide /usr/include/scsi
glibc and make headers_install_all provide /usr/include/scsi One of them has to go. A quick diff shows no differences, expect: scsi.h: glibc #define STATUS_MASK 0x3e Linux #define STATUS_MASK 0xfe glibc #define ABORT 0x06 Linux #define ABORT_TASK_SET 0x06 sg.h:struct sg_iovec ->sg_iovec unsigned char * in glibc void * in Linux glibc #define SG_DEFAULT_RETRIES 1 Linux #define SG_DEFAULT_RETRIES 0 Which copy should be provided by a distributor? - 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
PS3 Storage Driver O_DIRECT issue
This driver (or the generic PS3 code) has appearently problems with O_DIRECT. glibc aborts parted because the malloc metadata get corrupted. While it is reproducible, the place where it crashes changes with every version of the debug attempt. I dont have a handle right now, all I know is that the metadata after a malloc area get overwritten with zeros. Can you have a look at this? parted /dev/ps3da print (a few times) - 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
s390 error: implicit declaration of function sg_dma_len
Current Linus tree does not compile on s390 because esp_scsi references unavailable functions. /dev/shm/R/linux-2.6.21/drivers/scsi/esp_scsi.c: In function `esp_map_dma': /dev/shm/R/linux-2.6.21/drivers/scsi/esp_scsi.c:338: error: implicit declaration of function `sg_dma_len' /dev/shm/R/linux-2.6.21/drivers/scsi/esp_scsi.c: In function `esp_cur_dma_addr': /dev/shm/R/linux-2.6.21/drivers/scsi/esp_scsi.c:357: error: implicit declaration of function `sg_dma_address' - 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: improve sg_luns output for iscsi
On Tue, Mar 06, Douglas Gilbert wrote: > In summary sg_luns is probably not what you want! Yes, it can be done in bash. cd /sys/block/sde/device ; i=`pwd -P` ; printf '%x%012x\n' ${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
Re: improve sg_luns output for iscsi
On Tue, Mar 06, Doug Maxey wrote: > So to me, using > sg_luns |tail -1 > should get the line with the singleton lun in it, albeit with some > amount of leading whitespace. In the example above, if installing onto sdc, tail -n 1 would give the lun value from sdd. > Can you extract some value from the installer that will give you the > path to the target? Its hopefully somewhere in sysfs, just where? You can not expect that the bootfile was loaded from iscsi when installing onto iscsi. - 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
improve sg_luns output for iscsi
Upcoming IBM pSeries firmware can boot from iscsi. To configure the openfirmware boot-device string, we need to construct a correct devicepath. This path includes the lun. Its currently not 100% clear how exactly this lun value has to look like. sg_luns may be the tool to get the value. But its current output is not parseable by scripts. It even gives the same output for two different scsi devices: girgendwas:~ # lsscsi [0:0:0:0]diskDGC RAID 5 0219 /dev/sda [0:0:0:1]diskDGC RAID 5 0219 /dev/sdb [0:0:0:2]diskDGC RAID 5 0219 /dev/sdc [0:0:0:3]diskDGC RAID 5 0219 /dev/sdd girgendwas:~ # sg_luns -V sg_luns: version: 1.05 20060127 girgendwas:~ # sg_luns /dev/sdd Lun list length = 32 which imples 4 lun entries Report luns [select_report=0]: 0001 0002 0003 girgendwas:~ # sg_luns /dev/sdc Lun list length = 32 which imples 4 lun entries Report luns [select_report=0]: 0001 0002 0003 Is it possible to print the lun only for the requested scsi device? - 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] cleanup variable usage in mesh interrupt handler
convert void* to struct mesh_state* remove unused irq argument from mesh_interrupt() Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> --- drivers/scsi/mesh.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) Index: linux-2.6/drivers/scsi/mesh.c === --- linux-2.6.orig/drivers/scsi/mesh.c +++ linux-2.6/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
Re: [PATCH] uninline exported ata_host_intr
On Fri, Aug 05, Andrew Vasquez wrote: > Confused, you found a reference to ata_host_intr() in qla4xxx > (QLogic's iSCSI driver)? This is in a SLES kernel correct, and not in > mainline? No, qla4xxx called extern inline function in foo.c from bar.c. gcc4 doesnt like that because the 'function body is not available'. I found no external users of ata_host_intr, maybe it happens there as well. If there is a significant performance boost with these inline constructs, thats just fine with me as long as it compiles. - 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] uninline exported ata_host_intr
On Fri, Aug 05, Jeff Garzik wrote: > When I wrote this, the compiler did what I expected: it inlined the > local copy, and exported a copy for external modules to call. so you have the code twice? how clever... > Have you verified the asm does not do this? What changed? I just grepped ^inline below drivers/scsi and found this in qla4xxx and libata-core. - 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] uninline exported ata_host_intr
ata_host_intr cant be either inline or exported. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> Index: linux-2.6.12/drivers/scsi/libata-core.c === --- linux-2.6.12.orig/drivers/scsi/libata-core.c +++ linux-2.6.12/drivers/scsi/libata-core.c @@ -3487,7 +3487,7 @@ void ata_bmdma_stop(struct ata_port *ap) * One if interrupt was handled, zero if not (shared irq). */ -inline unsigned int ata_host_intr (struct ata_port *ap, +unsigned int ata_host_intr (struct ata_port *ap, struct ata_queued_cmd *qc) { u8 status, host_stat; - 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: 100% repeatable way to send firewire out to lunch permanently on 2.6.8.1
On Sun, Jul 31, Dan Hollis wrote: > On Sun, 24 Oct 2004, Olaf Hering wrote: > > On Sun, Oct 24, James Bottomley wrote: > > > The trace doesn't show any error handler activity at all. Are there no > > > messages in the log about offlining the device? If not, it sounds like > > > there's a problem somewhere in the firewire system. > > How should sbp2_remove_device get rid of the device? It calls > > scsi_remove_host, which calls scsi_remove_device, which sets the mode to > > SDEV_CANCEL, then calls to device_del. sr_do_ioctl expects SDEV_OFFLINE. > > Has there been any progress on this issue? I just got my _entire scsi > subsystem_ sent out to lunch because a firewire device lost power. I cant help you with that, sr_mod is likely still broken with MRW capable drives. But sbp2 is still the culprit, incomplete error handling. - 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
[PATCH 46/82] remove unused drivers/scsi/pci2000.h
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. pci2000.h is unused, so drop the whole file Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/pci2000.h | 200 - 1 files changed, 200 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/pci2000.h === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/pci2000.h +++ /dev/null @@ -1,200 +0,0 @@ -/ - * Perceptive Solutions, Inc. PCI-2000 device driver for Linux. - * - * pci2000.h - Linux Host Driver for PCI-2000 IntelliCache SCSI Adapters - * - * Copyright (c) 1997-1999 Perceptive Solutions, Inc. - * All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that redistributions of source - * code retain the above copyright notice and this comment without - * modification. - * - * Technical updates and product information at: - * http://www.psidisk.com - * - * Please send questions, comments, bug reports to: - * [EMAIL PROTECTED] Technical Support - * - / -#ifndef _PCI2000_H -#define _PCI2000_H - -#include - -#ifndefPSI_EIDE_SCSIOP -#definePSI_EIDE_SCSIOP 1 - -#ifndef LINUX_VERSION_CODE -#include -#endif -#defineLINUXVERSION(v,p,s)(((v)<<16) + ((p)<<8) + (s)) - -// -/* definition of standard data types */ -// -#defineCHARchar -#defineUCHAR unsigned char -#defineSHORT short -#defineUSHORT unsigned short -#defineBOOLlong -#defineLONGlong -#defineULONG unsigned long -#defineVOIDvoid - -typedefCHAR*PCHAR; -typedefUCHAR *PUCHAR; -typedefSHORT *PSHORT; -typedefUSHORT *PUSHORT; -typedefBOOL*PBOOL; -typedefLONG*PLONG; -typedefULONG *PULONG; -typedefVOID*PVOID; - - -// -/* Misc. macros */ -// -#define ANY2SCSI(up, p)-((UCHAR *)up)[0] = (((ULONG)(p)) >> 8);-((UCHAR *)up)[1] = ((ULONG)(p)); - -#define SCSI2LONG(up) -( (((long)*(((UCHAR *)up))) << 16) -+ (((long)(((UCHAR *)up)[1])) << 8)-+ ((long)(((UCHAR *)up)[2])) ) - -#define XANY2SCSI(up, p) -((UCHAR *)up)[0] = ((long)(p)) >> 24; -((UCHAR *)up)[1] = ((long)(p)) >> 16; -((UCHAR *)up)[2] = ((long)(p)) >> 8; -((UCHAR *)up)[3] = ((long)(p)); - -#define XSCSI2LONG(up) -( (((long)(((UCHAR *)up)[0])) << 24) -+ (((long)(((UCHAR *)up)[1])) << 16) -+ (((long)(((UCHAR *)up)[2])) << 8) -+ ((long)(((UCHAR *)up)[3])) ) - -// -/* SCSI CDB operation codes*/ -// -#define SCSIOP_TEST_UNIT_READY 0x00 -#define SCSIOP_REZERO_UNIT 0x01 -#define SCSIOP_REWIND 0x01 -#define SCSIOP_REQUEST_BLOCK_ADDR 0x02 -#define SCSIOP_REQUEST_SENSE 0x03 -#define SCSIOP_FORMAT_UNIT 0x04 -#define SCSIOP_READ_BLOCK_LIMITS 0x05 -#define SCSIOP_REASSIGN_BLOCKS 0x07 -#define SCSIOP_READ6 0x08 -#define SCSIOP_RECEIVE 0x08 -#define SCSIOP_WRITE6 0x0A -#define SCSIOP_PRINT 0x0A -#define SCSIOP_SEND0x0A -#define SCSIOP_SEEK6 0x0B -#define SCSIOP_TRACK_SELECT0x0B -#define SCSIOP_SLEW_PRINT 0x0B -#define SCSIOP_SEEK_BLOCK 0x0C -#define SCSIOP_PARTITION 0x0D -#define SCSIOP_READ_REVERSE0x0F -#define SCSIOP_WRITE_FILEMARKS 0x10 -#define SCSIOP_FLUSH_BUFFER0x10 -#define SCSIOP_SPACE 0x11 -#define SCSIOP_INQUIRY 0x12 -#define SCSIOP_VERIFY6 0x13 -#define SCSIOP_RECOVER_BUF_DATA0x14 -#define SCSIOP_MODE_SELECT 0x15 -#define SCSIOP_RESERVE_UNIT0x16 -#define SCSIOP_RELEASE_UNIT0x17 -#define SCSIOP_COPY0x18 -#define SCSIOP_ERASE
[PATCH 47/82] remove linux/version.h from drivers/scsi/pcmcia/nsp*
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. remove code for obsolete kernel versions Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/pcmcia/nsp_cs.c | 158 --- drivers/scsi/pcmcia/nsp_cs.h | 68 -- 2 files changed, 226 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/pcmcia/nsp_cs.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/pcmcia/nsp_cs.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/pcmcia/nsp_cs.c @@ -27,7 +27,6 @@ /* $Id: nsp_cs.c,v 1.23 2003/08/18 11:09:19 elca Exp $ */ -#include #include #include #include @@ -85,10 +84,6 @@ static Scsi_Host_Template nsp_driver_tem .proc_name = "nsp_cs", .proc_info = nsp_proc_info, .name= "WorkBit NinjaSCSI-3/32Bi(16bit)", -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - .detect = nsp_detect_old, - .release = nsp_release_old, -#endif .info= nsp_info, .queuecommand= nsp_queuecommand, /* .eh_abort_handler= nsp_eh_abort,*/ @@ -99,9 +94,6 @@ static Scsi_Host_Template nsp_driver_tem .sg_tablesize= SG_ALL, .cmd_per_lun = 1, .use_clustering = DISABLE_CLUSTERING, -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,2)) - .use_new_eh_code = 1, -#endif }; static dev_link_t *dev_list = NULL; @@ -1316,11 +1308,7 @@ static struct Scsi_Host *nsp_detect(Scsi nsp_hw_data *data_b = &nsp_data_base, *data; nsp_dbg(NSP_DEBUG_INIT, "this_id=%d", sht->this_id); -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) host = scsi_host_alloc(&nsp_driver_template, sizeof(nsp_hw_data)); -#else - host = scsi_register(sht, sizeof(nsp_hw_data)); -#endif if (host == NULL) { nsp_dbg(NSP_DEBUG_INIT, "host failed"); return NULL; @@ -1357,37 +1345,6 @@ static struct Scsi_Host *nsp_detect(Scsi return host; /* detect done. */ } -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -static int nsp_detect_old(Scsi_Host_Template *sht) -{ - if (nsp_detect(sht) == NULL) { - return 0; - } else { - //MOD_INC_USE_COUNT; - return 1; - } -} - - -static int nsp_release_old(struct Scsi_Host *shpnt) -{ - //nsp_hw_data *data = (nsp_hw_data *)shpnt->hostdata; - - /* PCMCIA Card Service dose same things below. */ - /* So we do nothing. */ - //if (shpnt->irq) { - // free_irq(shpnt->irq, data->ScsiInfo); - //} - //if (shpnt->io_port) { - // release_region(shpnt->io_port, shpnt->n_io_port); - //} - - //MOD_DEC_USE_COUNT; - - return 0; -} -#endif - /**/ /* return info string */ /**/ @@ -1408,16 +1365,11 @@ static const char *nsp_info(struct Scsi_ } while(0) static int nsp_proc_info( -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) struct Scsi_Host *host, -#endif char *buffer, char **start, off_t offset, intlength, -#if !(LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) - inthostno, -#endif intinout) { int id; @@ -1426,24 +1378,12 @@ nsp_proc_info( int speed; unsigned long flags; nsp_hw_data *data; -#if !(LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) - struct Scsi_Host *host; -#else int hostno; -#endif if (inout) { return -EINVAL; } -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) hostno = host->host_no; -#else - /* search this HBA host */ - host = scsi_host_hn_get(hostno); - if (host == NULL) { - return -ESRCH; - } -#endif data = (nsp_hw_data *)host->hostdata; @@ -1716,10 +1656,6 @@ static void nsp_cs_config(dev_link_t *li cistpl_cftable_entry_t dflt = { 0 }; struct Scsi_Host *host; nsp_hw_data *data = &nsp_data_base; -#if !(LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,74)) - Scsi_Device *dev; - dev_node_t **tail, *node; -#endif nsp_dbg(NSP_DEBUG_INIT, "in"); @@ -1865,17 +1801,7 @@ static void nsp_cs_config(dev_link_t *li goto cs_failed; } -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,2)) host = nsp_detect(&nsp_driver_template); -#else - scsi_register_host(&nsp_driver_template); - for (host = scsi_host_get_next(NULL); host != NULL; -host = scsi_host_get_next(host)) { - if (host->hostt == &nsp_driver_template) { - break; - } - } -#endif if (host == NULL) { nsp_dbg(NSP_DEBUG_INIT, "detect failed"); @@ -1883,7 +1809,6 @@ static void nsp_cs_config(dev_link_t *li } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,74)) scsi_add_ho
[PATCH 48/82] remove linux/version.h from drivers/scsi/qla1280.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. remove code for obsolete kernels Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/qla1280.c | 277 - 1 files changed, 277 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/qla1280.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/qla1280.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/qla1280.c @@ -332,7 +332,6 @@ #include #include -#include #include #include #include @@ -356,28 +355,16 @@ #include #include -#if LINUX_VERSION_CODE >= 0x020545 #include #include #include #include #include -#else -#include -#include "scsi.h" -#include -#include "sd.h" -#endif #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2) #include #endif -#if LINUX_VERSION_CODE < 0x020407 -#error "Kernels older than 2.4.7 are no longer supported" -#endif - - /* * Compile time Options: *0 - Disable and 1 - Enable @@ -441,52 +428,8 @@ #define NVRAM_DELAY() udelay(500) /* 2 microseconds */ -#if LINUX_VERSION_CODE < 0x020500 -#define HOST_LOCK &io_request_lock -#define irqreturn_tvoid -#define IRQ_RETVAL(foo) -#define MSG_ORDERED_TAG1 - -#define DMA_BIDIRECTIONAL SCSI_DATA_UNKNOWN -#define DMA_TO_DEVICE SCSI_DATA_WRITE -#define DMA_FROM_DEVICESCSI_DATA_READ -#define DMA_NONE SCSI_DATA_NONE - -#ifndef HAVE_SECTOR_T -typedef unsigned int sector_t; -#endif - -static inline void -scsi_adjust_queue_depth(struct scsi_device *device, int tag, int depth) -{ - if (tag) { - device->tagged_queue = tag; - device->current_tag = 0; - } - device->queue_depth = depth; -} -static inline struct Scsi_Host *scsi_host_alloc(Scsi_Host_Template *t, size_t s) -{ - return scsi_register(t, s); -} -static inline void scsi_host_put(struct Scsi_Host *h) -{ - scsi_unregister(h); -} -#else #define HOST_LOCK ha->host->host_lock -#endif -#if LINUX_VERSION_CODE < 0x020600 -#define DEV_SIMPLE_TAGS(device)device->tagged_queue -/* - * Hack around that qla1280_remove_one is called from - * qla1280_release in 2.4 - */ -#undef __devexit -#define __devexit -#else #define DEV_SIMPLE_TAGS(device) device->simple_tags -#endif #if defined(__ia64__) && !defined(ia64_platform_is) #define ia64_platform_is(foo) (!strcmp(x, platform_name)) #endif @@ -506,9 +449,6 @@ static void qla1280_remove_one(struct pc * QLogic Driver Support Function Prototypes. */ static void qla1280_done(struct scsi_qla_host *); -#if LINUX_VERSION_CODE < 0x020545 -static void qla1280_get_target_options(struct scsi_cmnd *, struct scsi_qla_host *); -#endif static int qla1280_get_token(char *); static int qla1280_setup(char *s) __init; @@ -610,11 +550,7 @@ __setup("qla1280=", qla1280_setup); #define CMD_SNSLEN(Cmnd)sizeof(Cmnd->sense_buffer) #define CMD_RESULT(Cmnd)Cmnd->result #define CMD_HANDLE(Cmnd)Cmnd->host_scribble -#if LINUX_VERSION_CODE < 0x020545 -#define CMD_REQUEST(Cmnd) Cmnd->request.cmd -#else #define CMD_REQUEST(Cmnd) Cmnd->request->cmd -#endif #define CMD_HOST(Cmnd) Cmnd->device->host #define SCSI_BUS_32(Cmnd) Cmnd->device->channel @@ -1179,97 +1115,6 @@ qla1280_biosparam(struct scsi_device *sd return 0; } -#if LINUX_VERSION_CODE < 0x020600 -static int -qla1280_detect(Scsi_Host_Template *template) -{ - struct pci_device_id *id = &qla1280_pci_tbl[0]; - struct pci_dev *pdev = NULL; - int num_hosts = 0; - - if (sizeof(struct srb) > sizeof(Scsi_Pointer)) { - printk(KERN_WARNING - "qla1280: struct srb too big, abortingn"); - return 0; - } - - if ((DMA_BIDIRECTIONAL != PCI_DMA_BIDIRECTIONAL) || - (DMA_TO_DEVICE != PCI_DMA_TODEVICE) || - (DMA_FROM_DEVICE != PCI_DMA_FROMDEVICE) || - (DMA_NONE != PCI_DMA_NONE)) { - printk(KERN_WARNING - "qla1280: dma direction bits don't matchn"); - return 0; - } - -#ifdef MODULE - /* -* If we are called as a module, the qla1280 pointer may not be null -* and it would point to our bootup string, just like on the lilo -* command line. IF not NULL, then process this config string with -* qla1280_setup -* -* Boot time Options -* To add options at boot time add a line to your lilo.conf file like: -* append="qla1280=verbose,max_tags:{{255,255,255,255},{255,255,255,255}}" -* which will result in the first four devices on the first two -
[PATCH 43/82] remove linux/version.h from drivers/scsi/mvme147.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/mvme147.c |1 - 1 files changed, 1 deletion(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/mvme147.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/mvme147.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/mvme147.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include - 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 29/82] remove linux/version.h from drivers/scsi/3w-xxxx.h
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/3w-.h |1 - 1 files changed, 1 deletion(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/3w-.h === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/3w-.h +++ linux-2.6.13-rc2-mm1/drivers/scsi/3w-.h @@ -54,7 +54,6 @@ #ifndef _3W__H #define _3W__H -#include #include /* AEN strings */ - 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 38/82] remove linux/version.h from drivers/scsi/gvp11.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/gvp11.c |1 - 1 files changed, 1 deletion(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/gvp11.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/gvp11.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/gvp11.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include - 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 40/82] remove linux/version.h from drivers/scsi/ips
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. remove code for obsolete kernels Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/ips.c | 104 - drivers/scsi/ips.h | 33 2 files changed, 137 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/ips.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/ips.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/ips.c @@ -162,7 +162,6 @@ #include #include #include -#include #include #include #include @@ -180,12 +179,7 @@ #include #include "scsi.h" - -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0) -#include "hosts.h" -#else #include -#endif #include "ips.h" @@ -214,21 +208,10 @@ module_param(ips, charp, 0); #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" #endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0) -#include -#include "sd.h" -#define IPS_SG_ADDRESS(sg) ((sg)->address) -#define IPS_LOCK_SAVE(lock,flags) spin_lock_irqsave(&io_request_lock,flags) -#define IPS_UNLOCK_RESTORE(lock,flags) spin_unlock_irqrestore(&io_request_lock,flags) -#ifndef __devexit_p -#define __devexit_p(x) x -#endif -#else #define IPS_SG_ADDRESS(sg) (page_address((sg)->page) ? page_address((sg)->page)+(sg)->offset : NULL) #define IPS_LOCK_SAVE(lock,flags) do{spin_lock(lock);(void)flags;}while(0) #define IPS_UNLOCK_RESTORE(lock,flags) do{spin_unlock(lock);(void)flags;}while(0) -#endif #define IPS_DMA_DIR(scb) ((!scb->scsi_cmd || ips_is_passthru(scb->scsi_cmd) || DMA_NONE == scb->scsi_cmd->sc_data_direction) ? @@ -384,24 +367,13 @@ static Scsi_Host_Template ips_driver_tem .eh_abort_handler = ips_eh_abort, .eh_host_reset_handler = ips_eh_reset, .proc_name = "ips", -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) .proc_info = ips_proc_info, .slave_configure= ips_slave_configure, -#else - .proc_info = ips_proc24_info, - .select_queue_depths= ips_select_queue_depth, -#endif .bios_param = ips_biosparam, .this_id= -1, .sg_tablesize = IPS_MAX_SG, .cmd_per_lun= 3, .use_clustering = ENABLE_CLUSTERING, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - .use_new_eh_code= 1, -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) && LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -.highmem_io = 1, -#endif }; static IPS_DEFINE_COMPAT_TABLE( Compatable ); /* Version Compatability Table */ @@ -1186,17 +1158,10 @@ ips_queue(Scsi_Cmnd * SC, void (*done) ( /* */ // static int -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -ips_biosparam(Disk * disk, kdev_t dev, int geom[]) -{ - ips_ha_t *ha = (ips_ha_t *) disk->device->host->hostdata; - unsigned long capacity = disk->capacity; -#else ips_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]) { ips_ha_t *ha = (ips_ha_t *) sdev->host->hostdata; -#endif int heads; int sectors; int cylinders; @@ -1234,70 +1199,6 @@ ips_biosparam(struct scsi_device *sdev, return (0); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - -/* ips_proc24_info is a wrapper around ips_proc_info * - * for compatibility with the 2.4 scsi parameters*/ -static int -ips_proc24_info(char *buffer, char **start, off_t offset, int length, - int hostno, int func) -{ - int i; - - for (i = 0; i < ips_next_controller; i++) { - if (ips_sh[i] && ips_sh[i]->host_no == hostno) { - return ips_proc_info(ips_sh[i], buffer, start, -offset, length, func); - } - } - return -EINVAL; -} - -// -/* */ -/* Routine Name: ips_select_queue_depth */ -/* */ -/* Routine Description: */ -/* */ -/* Select queue depths for the devices on the contoller */ -/* */ -// -static void -ips_select_queue_depth(struct Scsi_Host *host, Scsi_Device
[PATCH 36/82] remove linux/version.h from drivers/scsi/dpt/dpti_i2o.h
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. remove code for obsolete kernels Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/dpt/dpti_i2o.h | 11 --- 1 files changed, 11 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/dpt/dpti_i2o.h === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/dpt/dpti_i2o.h +++ linux-2.6.13-rc2-mm1/drivers/scsi/dpt/dpti_i2o.h @@ -22,7 +22,6 @@ #include #include /* Needed for MUTEX init macros */ -#include #include #include #include @@ -48,21 +47,11 @@ * I2O Interface Objects */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) - -#define DECLARE_MUTEX(name) struct semaphore name=MUTEX - -typedef struct wait_queue *adpt_wait_queue_head_t; -#define ADPT_DECLARE_WAIT_QUEUE_HEAD(wait) adpt_wait_queue_head_t wait = NULL -typedef struct wait_queue adpt_wait_queue_t; -#else - #include typedef wait_queue_head_t adpt_wait_queue_head_t; #define ADPT_DECLARE_WAIT_QUEUE_HEAD(wait) DECLARE_WAIT_QUEUE_HEAD(wait) typedef wait_queue_t adpt_wait_queue_t; -#endif /* * message structures */ - 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 44/82] remove linux/version.h from drivers/scsi/mvme16x.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/mvme16x.c |1 - 1 files changed, 1 deletion(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/mvme16x.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/mvme16x.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/mvme16x.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include - 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/82] remove linux/version.h from drivers/message/fusion
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. remove also drivers/message/fusion/linux_compat.h, because it is empty after the change Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/message/fusion/linux_compat.h | 18 -- drivers/message/fusion/mptbase.c |1 - drivers/message/fusion/mptbase.h |1 - drivers/message/fusion/mptctl.c |1 - drivers/message/fusion/mptctl.h |1 - drivers/message/fusion/mptfc.c|1 - drivers/message/fusion/mptlan.h |1 - drivers/message/fusion/mptscsih.c |1 - drivers/message/fusion/mptspi.c |1 - 9 files changed, 26 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/message/fusion/linux_compat.h === --- linux-2.6.13-rc2-mm1.orig/drivers/message/fusion/linux_compat.h +++ /dev/null @@ -1,18 +0,0 @@ -/* drivers/message/fusion/linux_compat.h */ - -#ifndef FUSION_LINUX_COMPAT_H -#define FUSION_LINUX_COMPAT_H - -#include -#include - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,6)) -static int inline scsi_device_online(struct scsi_device *sdev) -{ - return sdev->online; -} -#endif - - -/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -#endif /* _LINUX_COMPAT_H */ Index: linux-2.6.13-rc2-mm1/drivers/message/fusion/mptbase.c === --- linux-2.6.13-rc2-mm1.orig/drivers/message/fusion/mptbase.c +++ linux-2.6.13-rc2-mm1/drivers/message/fusion/mptbase.c @@ -47,7 +47,6 @@ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ #include -#include #include #include #include Index: linux-2.6.13-rc2-mm1/drivers/message/fusion/mptbase.h === --- linux-2.6.13-rc2-mm1.orig/drivers/message/fusion/mptbase.h +++ linux-2.6.13-rc2-mm1/drivers/message/fusion/mptbase.h @@ -49,7 +49,6 @@ #define MPTBASE_H_INCLUDED /*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -#include #include #include #include Index: linux-2.6.13-rc2-mm1/drivers/message/fusion/mptctl.c === --- linux-2.6.13-rc2-mm1.orig/drivers/message/fusion/mptctl.c +++ linux-2.6.13-rc2-mm1/drivers/message/fusion/mptctl.c @@ -45,7 +45,6 @@ */ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -#include #include #include #include Index: linux-2.6.13-rc2-mm1/drivers/message/fusion/mptctl.h === --- linux-2.6.13-rc2-mm1.orig/drivers/message/fusion/mptctl.h +++ linux-2.6.13-rc2-mm1/drivers/message/fusion/mptctl.h @@ -49,7 +49,6 @@ #define MPTCTL_H_INCLUDED /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -#include "linux/version.h" /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ Index: linux-2.6.13-rc2-mm1/drivers/message/fusion/mptlan.h === --- linux-2.6.13-rc2-mm1.orig/drivers/message/fusion/mptlan.h +++ linux-2.6.13-rc2-mm1/drivers/message/fusion/mptlan.h @@ -66,7 +66,6 @@ #include #include #include -#include #include #include // #include Index: linux-2.6.13-rc2-mm1/drivers/message/fusion/mptfc.c === --- linux-2.6.13-rc2-mm1.orig/drivers/message/fusion/mptfc.c +++ linux-2.6.13-rc2-mm1/drivers/message/fusion/mptfc.c @@ -43,7 +43,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -#include "linux_compat.h" /* linux-2.6 tweaks */ #include #include #include Index: linux-2.6.13-rc2-mm1/drivers/message/fusion/mptscsih.c === --- linux-2.6.13-rc2-mm1.orig/drivers/message/fusion/mptscsih.c +++ linux-2.6.13-rc2-mm1/drivers/message/fusion/mptscsih.c @@ -44,7 +44,6 @@ */ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -#include "linux_compat.h" /* linux-2.6 tweaks */ #include #include #include Index: linux-2.6.13-rc2-mm1/drivers/message/fusion/mptspi.c === --- linux-2.6.13-rc2-mm1.orig/drivers/message/fusion/mptspi.c +++ linux-2.6.13-rc2-mm1/drivers/message/fusion/mptspi.c @@ -44,7 +44,6 @@ */ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -#include "linux_compat.h" /* linux-2.6 tweaks */ #include #include #include - 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 34/82] remove linux/version.h from drivers/scsi/bvme6000.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/bvme6000.c |1 - 1 files changed, 1 deletion(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/bvme6000.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/bvme6000.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/bvme6000.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include - 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 45/82] remove linux/version.h from drivers/scsi/nsp32
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. remove code for obsolete kernels Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/nsp32.c | 73 --- drivers/scsi/nsp32.h | 42 - 2 files changed, 115 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/nsp32.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/nsp32.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/nsp32.c @@ -23,7 +23,6 @@ * 1.2: PowerPC (big endian) support. */ -#include #include #include #include @@ -49,10 +48,6 @@ #include #include -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) -# include -#endif - #include "nsp32.h" @@ -199,17 +194,9 @@ static int __initinit_nsp32 (void) static void __exitexit_nsp32 (void); /* struct Scsi_Host_Template */ -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) static int nsp32_proc_info (struct Scsi_Host *, char *, char **, off_t, int, int); -#else -static int nsp32_proc_info (char *, char **, off_t, int, int, int); -#endif -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) static int nsp32_detect (struct pci_dev *pdev); -#else -static int nsp32_detect (Scsi_Host_Template *); -#endif static int nsp32_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *)); static const char *nsp32_info(struct Scsi_Host *); @@ -296,15 +283,6 @@ static struct scsi_host_template nsp32_t .eh_abort_handler = nsp32_eh_abort, .eh_bus_reset_handler = nsp32_eh_bus_reset, .eh_host_reset_handler = nsp32_eh_host_reset, -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,74)) - .detect = nsp32_detect, - .release= nsp32_release, -#endif -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,2)) - .use_new_eh_code= 1, -#else -/* .highmem_io = 1, */ -#endif }; #include "nsp32_io.h" @@ -1211,12 +1189,8 @@ static irqreturn_t do_nsp32_isr(int irq, int ret; int handled = 0; -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) struct Scsi_Host *host = data->Host; spin_lock_irqsave(host->host_lock, flags); -#else - spin_lock_irqsave(&io_request_lock, flags); -#endif /* * IRQ check, then enable IRQ mask @@ -1480,11 +1454,7 @@ static irqreturn_t do_nsp32_isr(int irq, nsp32_write2(base, IRQ_CONTROL, 0); out2: -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) spin_unlock_irqrestore(host->host_lock, flags); -#else - spin_unlock_irqrestore(&io_request_lock, flags); -#endif nsp32_dbg(NSP32_DEBUG_INTR, "exit"); @@ -1500,27 +1470,18 @@ static irqreturn_t do_nsp32_isr(int irq, } } while(0) static int nsp32_proc_info( -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) struct Scsi_Host *host, -#endif char *buffer, char**start, off_t offset, int length, -#if !(LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) - int hostno, -#endif int inout) { char *pos = buffer; int thislength; unsigned long flags; nsp32_hw_data*data; -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) int hostno; -#else - struct Scsi_Host *host; -#endif unsigned int base; unsigned char mode_reg; int id, speed; @@ -1531,15 +1492,7 @@ static int nsp32_proc_info( return -EINVAL; } -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) hostno = host->host_no; -#else - /* search this HBA host */ - host = scsi_host_hn_get(hostno); - if (host == NULL) { - return -ESRCH; - } -#endif data = (nsp32_hw_data *)host->hostdata; base = host->io_port; @@ -2674,17 +2627,10 @@ static void nsp32_sack_negate(nsp32_hw_d * 0x900-0xbff: (map same 0x800-0x8ff I/O port image repeatedly) * 0xc00-0xfff: CardBus status registers */ -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) #define DETECT_OK 0 #define DETECT_NG 1 #define PCIDEVpdev static int nsp32_detect(struct pci_dev *pdev) -#else -#define DETECT_OK 1 -#define DETECT_NG 0 -#define PCIDEV(data->Pci) -static int nsp32_detect(Scsi_Host_Template *sht) -#endif { struct Scsi_Host *host; /* registered host structure */ struct resource *res; @@ -2697,11 +2643,7 @@ static int nsp32_detect(Scsi_Host_Templa /* * register this HBA as SCSI device */ -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) host = scsi_host_alloc(&nsp32_template, sizeof(nsp32_hw_data)); -#else - host = scsi_register(sht, sizeof(nsp32_hw_data)); -#endif if (host == NULL) { nsp32_msg (KERN_ERR, "failed to scsi register"); goto err; @@ -2719,9 +2661,6 @@ static int nsp32_detect(Scsi_Host_Templa host->unique_id = data->BaseAddress; host->n_io
[PATCH 42/82] remove linux/version.h from drivers/scsi/megaraid
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/megaraid/mega_common.h |1 - drivers/scsi/megaraid/megaraid_mm.h |1 - 2 files changed, 2 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/megaraid/mega_common.h === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/megaraid/mega_common.h +++ linux-2.6.13-rc2-mm1/drivers/scsi/megaraid/mega_common.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include Index: linux-2.6.13-rc2-mm1/drivers/scsi/megaraid/megaraid_mm.h === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/megaraid/megaraid_mm.h +++ linux-2.6.13-rc2-mm1/drivers/scsi/megaraid/megaraid_mm.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include - 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 35/82] remove linux/version.h from drivers/scsi/cpqfcTSinit.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. remove code for obsolete kernels Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/cpqfcTSinit.c | 32 1 files changed, 32 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/cpqfcTSinit.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/cpqfcTSinit.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/cpqfcTSinit.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -66,37 +65,10 @@ MODULE_LICENSE("GPL"); int cpqfcTS_TargetDeviceReset( Scsi_Device *ScsiDev, unsigned int reset_flags); -// This struct was originally defined in -// /usr/src/linux/include/linux/proc_fs.h -// since it's only partially implemented, we only use first -// few fields... -// NOTE: proc_fs changes in 2.4 kernel - -#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27) -static struct proc_dir_entry proc_scsi_cpqfcTS = -{ - PROC_SCSI_CPQFCTS, // ushort low_ino (enumerated list) - 7, // ushort namelen - DEV_NAME,// const char* name - S_IFDIR | S_IRUGO | S_IXUGO, // mode_t mode - 2// nlink_t nlink - // etc. ... -}; - - -#endif - -#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,7) # define CPQFC_DECLARE_COMPLETION(x) DECLARE_COMPLETION(x) # define CPQFC_WAITING waiting # define CPQFC_COMPLETE(x) complete(x) # define CPQFC_WAIT_FOR_COMPLETION(x) wait_for_completion(x); -#else -# define CPQFC_DECLARE_COMPLETION(x) DECLARE_MUTEX_LOCKED(x) -# define CPQFC_WAITING sem -# define CPQFC_COMPLETE(x) up(x) -# define CPQFC_WAIT_FOR_COMPLETION(x) down(x) -#endif static int cpqfc_alloc_private_data_pool(CPQFCHBA *hba); @@ -288,11 +260,7 @@ int cpqfcTS_detect(Scsi_Host_Template *S ENTER("cpqfcTS_detect"); -#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,27) - ScsiHostTemplate->proc_dir = &proc_scsi_cpqfcTS; -#else ScsiHostTemplate->proc_name = "cpqfcTS"; -#endif for( i=0; i < HBA_TYPES; 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 37/82] remove linux/version.h from drivers/scsi/gdth
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. remove code for obsolete kernels Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/gdth.c | 204 --- drivers/scsi/gdth.h | 11 -- drivers/scsi/gdth_proc.c | 143 drivers/scsi/gdth_proc.h |6 - 4 files changed, 1 insertion(+), 363 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/gdth.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/gdth.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/gdth.c @@ -374,7 +374,6 @@ #include -#include #include #include #include @@ -398,12 +397,7 @@ #include #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #include -#else -#include -#include "sd.h" -#endif #include "scsi.h" #include @@ -2135,29 +2129,17 @@ static int __init gdth_search_drives(int printk("GDT-HA %d: Vendor: %s Name: %sn", hanum,oemstr->text.oem_company_name,ha->binfo.type_string); /* Save the Host Drive inquiry data */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) strlcpy(ha->oem_name,oemstr->text.scsi_host_drive_inquiry_vendor_id, sizeof(ha->oem_name)); -#else -strncpy(ha->oem_name,oemstr->text.scsi_host_drive_inquiry_vendor_id,7); -ha->oem_name[7] = '0'; -#endif } else { /* Old method, based on PCI ID */ TRACE2(("gdth_search_drives(): CACHE_READ_OEM_STRING_RECORD failedn")); printk("GDT-HA %d: Name: %sn", hanum,ha->binfo.type_string); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) if (ha->oem_id == OEM_ID_INTEL) strlcpy(ha->oem_name,"Intel ", sizeof(ha->oem_name)); else strlcpy(ha->oem_name,"ICP", sizeof(ha->oem_name)); -#else -if (ha->oem_id == OEM_ID_INTEL) -strcpy(ha->oem_name,"Intel "); -else -strcpy(ha->oem_name,"ICP"); -#endif } /* scanning for host drives */ @@ -4293,10 +4275,6 @@ static int __init gdth_detect(Scsi_Host_ hdr_channel = ha->bus_cnt; ha->virt_bus = hdr_channel; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) && -LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -shp->highmem_io = 0; -#endif if (ha->cache_feat & ha->raw_feat & ha->screen_feat & GDT_64BIT) shp->max_cmd_len = 16; @@ -4417,10 +4395,6 @@ static int __init gdth_detect(Scsi_Host_ hdr_channel = ha->bus_cnt; ha->virt_bus = hdr_channel; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) && -LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -shp->highmem_io = 0; -#endif if (ha->cache_feat & ha->raw_feat & ha->screen_feat & GDT_64BIT) shp->max_cmd_len = 16; @@ -4521,9 +4495,6 @@ static int __init gdth_detect(Scsi_Host_ ha->virt_bus = hdr_channel; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -scsi_set_pci_device(shp, pcistr[ctr].pdev); -#endif if (!(ha->cache_feat & ha->raw_feat & ha->screen_feat &GDT_64BIT)|| /* 64-bit DMA only supported from FW >= x.43 */ (!ha->dma64_support)) { @@ -4755,11 +4726,7 @@ static int gdth_eh_bus_reset(Scsi_Cmnd * return SUCCESS; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static int gdth_bios_param(struct scsi_device *sdev,struct block_device *bdev,sector_t cap,int *ip) -#else -static int gdth_bios_param(Disk *disk,kdev_t dev,int *ip) -#endif { unchar b, t; int hanum; @@ -4767,13 +4734,8 @@ static int gdth_bios_param(Disk *disk,kd struct scsi_device *sd; unsigned capacity; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) sd = sdev; capacity = cap; -#else -sd = disk->device; -capacity = disk->capacity; -#endif hanum = NUMDATA(sd->host)->hanum; b = virt_ctr ? NUMDATA(sd->host)->busnum : sd->channel; t = sd->id; @@ -4921,11 +4883,7 @@ static int ioc_resetdrv(void __user *arg gdth_cmd_str cmd; int hanum; gdth_ha_str *ha; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) Scsi_Request *srp; -#else -Scsi_Cmnd *scp; -#endif if (copy_from_user(&res, arg, sizeof(gdth_ioctl_reset)) || res.ionode >= gdth_ctr_count || res.number >= MAX_HDRIVES) @@ -4942,7 +4900,6 @@ static int ioc_resetdrv(void __user *arg cmd.u.cache64.DeviceNo = res.number; else cmd.u.cache.DeviceNo = res.number; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) srp = scsi_allocate_request(ha->sdev, GFP_KERNEL); if (!srp) return -ENOMEM; @@ -4951,16 +4908,6 @@ static int ioc_resetdrv(void __user *arg gdth_do_req(srp, &cmd, cmnd, 30); res.status = (ushort)srp->sr_command->SCp.Status; scsi_release_request(srp); -#else -scp = scsi_allocate_device(ha->sdev, 1, FALSE); -if (!scp) -return -ENOMEM; -scp->cmd_len = 12; -scp->use_sg = 0; -gdth_do_cmd(scp, &cmd, c
[PATCH 31/82] remove linux/version.h from drivers/scsi/aic7xxx/
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. remove code for obsolete kernels Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/aic7xxx/aic79xx_osm.c | 262 - drivers/scsi/aic7xxx/aic79xx_osm.h | 20 -- drivers/scsi/aic7xxx/aic79xx_osm_pci.c |6 drivers/scsi/aic7xxx/aic79xx_proc.c| 12 - drivers/scsi/aic7xxx/aic7xxx_osm.h |1 drivers/scsi/aic7xxx/aiclib.c |1 drivers/scsi/aic7xxx/aiclib.h | 10 - 7 files changed, 312 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/aic7xxx/aic79xx_osm.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/aic7xxx/aic79xx_osm.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -54,10 +54,6 @@ #include /* __setup */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "sd.h"/* For geometry detection */ -#endif - #include/* For fetching system memory size */ #include /* For ssleep/msleep */ @@ -66,11 +62,6 @@ */ spinlock_t ahd_list_spinlock; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -/* For dynamic sglist size calculation. */ -u_int ahd_linux_nseg; -#endif - /* * Bucket size for counting good commands in between bad ones. */ @@ -709,7 +700,6 @@ ahd_linux_unmap_scb(struct ahd_softc *ah static int ahd_linux_detect(Scsi_Host_Template *); static const char *ahd_linux_info(struct Scsi_Host *); static int ahd_linux_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *)); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) static int ahd_linux_slave_alloc(Scsi_Device *); static int ahd_linux_slave_configure(Scsi_Device *); static voidahd_linux_slave_destroy(Scsi_Device *); @@ -717,14 +707,6 @@ static void ahd_linux_slave_destroy(S static int ahd_linux_biosparam(struct scsi_device*, struct block_device*, sector_t, int[]); #endif -#else -static intahd_linux_release(struct Scsi_Host *); -static void ahd_linux_select_queue_depth(struct Scsi_Host *host, - Scsi_Device *scsi_devs); -#if defined(__i386__) -static intahd_linux_biosparam(Disk *, kdev_t, int[]); -#endif -#endif static int ahd_linux_bus_reset(Scsi_Cmnd *); static int ahd_linux_dev_reset(Scsi_Cmnd *); static int ahd_linux_abort(Scsi_Cmnd *); @@ -749,45 +731,6 @@ static intahd_linux_abort(Scsi_Cmnd static void ahd_linux_size_nseg(void) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - u_int cur_size; - u_int best_size; - - /* -* The SCSI allocator rounds to the nearest 512 bytes -* an cannot allocate across a page boundary. Our algorithm -* is to start at 1K of scsi malloc space per-command and -* loop through all factors of the PAGE_SIZE and pick the best. -*/ - best_size = 0; - for (cur_size = 1024; cur_size <= PAGE_SIZE; cur_size *= 2) { - u_int nseg; - - nseg = cur_size / sizeof(struct scatterlist); - if (nseg < AHD_LINUX_MIN_NSEG) - continue; - - if (best_size == 0) { - best_size = cur_size; - ahd_linux_nseg = nseg; - } else { - u_int best_rem; - u_int cur_rem; - - /* -* Compare the traits of the current "best_size" -* with the current size to determine if the -* current size is a better size. -*/ - best_rem = best_size % sizeof(struct scatterlist); - cur_rem = cur_size % sizeof(struct scatterlist); - if (cur_rem < best_rem) { - best_size = cur_size; - ahd_linux_nseg = nseg; - } - } - } -#endif } /* @@ -800,14 +743,6 @@ ahd_linux_detect(Scsi_Host_Template *tem int found; int error = 0; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - /* -* It is a bug that the upper layer takes -* this lock just prior to calling us. -*/ - spin_unlock_irq(&io_request_lock); -#endif - /* * Sanity checking of Linux SCSI data structures so * that some of our hacks^H^H^H^H^Hassumptions aren't @@ -855,47 +790,10 @@ ahd_linux_detect(Scsi_Host_Template *tem if (ahd_linux_register_host(ahd, template) == 0) found++; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - spin_lock_irq(&io_request_lock); -#endif aic79xx_detect_complete++; return 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -/* - * Free the passed in Scsi_Host memory structures prior to unloading the - * module. - */ -static int -ahd_li
[PATCH 33/82] remove linux/version.h from drivers/scsi/arcmsr
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/arcmsr/arcmsr.c |1 - drivers/scsi/arcmsr/arcmsr.h |1 - 2 files changed, 2 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/arcmsr/arcmsr.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/arcmsr/arcmsr.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/arcmsr/arcmsr.c @@ -81,7 +81,6 @@ #include #endif #include -#include /* Now your module include files & source code follows */ #include #include Index: linux-2.6.13-rc2-mm1/drivers/scsi/arcmsr/arcmsr.h === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/arcmsr/arcmsr.h +++ linux-2.6.13-rc2-mm1/drivers/scsi/arcmsr/arcmsr.h @@ -43,7 +43,6 @@ ** */ #include -#include #if defined(__SMP__) && !defined(CONFIG_SMP) # define CONFIG_SMP - 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 39/82] remove linux/version.h from drivers/scsi/ibmmca.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/ibmmca.c |6 -- 1 files changed, 6 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/ibmmca.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/ibmmca.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/ibmmca.c @@ -18,12 +18,6 @@ */ #include -#ifndef LINUX_VERSION_CODE -#include -#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) -#error "This driver works only with kernel 2.5.45 or higher!" -#endif #include #include #include - 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 30/82] remove linux/version.h from drivers/scsi/a2091.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/a2091.c |1 - 1 files changed, 1 deletion(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/a2091.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/a2091.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/a2091.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include - 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 41/82] remove linux/version.h from drivers/scsi/iteraid.h
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/iteraid.h |1 - 1 files changed, 1 deletion(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/iteraid.h === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/iteraid.h +++ linux-2.6.13-rc2-mm1/drivers/scsi/iteraid.h @@ -23,7 +23,6 @@ #ifndef _ITERAID_H_ #define _ITERAID_H_ -#include #include #define ITE_VENDOR_ID 0x1283 - 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 32/82] remove linux/version.h from drivers/scsi/amiga7xx.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/amiga7xx.c |1 - 1 files changed, 1 deletion(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/amiga7xx.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/amiga7xx.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/amiga7xx.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include - 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 52/82] remove linux/version.h from drivers/scsi/wd33c93.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/wd33c93.c |1 - 1 files changed, 1 deletion(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/wd33c93.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/wd33c93.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/wd33c93.c @@ -77,7 +77,6 @@ #include #include #include -#include #include #include #include - 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 50/82] remove linux/version.h from drivers/scsi/sg.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/sg.c |4 1 files changed, 4 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/sg.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/sg.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/sg.c @@ -67,10 +67,6 @@ static int sg_proc_init(void); static void sg_proc_cleanup(void); #endif -#ifndef LINUX_VERSION_CODE -#include -#endif /* LINUX_VERSION_CODE */ - #define SG_ALLOW_DIO_DEF 0 #define SG_ALLOW_DIO_CODE /* compile out by commenting this define */ - 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 51/82] remove linux/version.h from drivers/scsi/sgiwd93.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/sgiwd93.c |1 - 1 files changed, 1 deletion(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/sgiwd93.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/sgiwd93.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/sgiwd93.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include - 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 49/82] remove linux/version.h from drivers/scsi/scsi_debug.c
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> drivers/scsi/scsi_debug.c |4 1 files changed, 4 deletions(-) Index: linux-2.6.13-rc2-mm1/drivers/scsi/scsi_debug.c === --- linux-2.6.13-rc2-mm1.orig/drivers/scsi/scsi_debug.c +++ linux-2.6.13-rc2-mm1/drivers/scsi/scsi_debug.c @@ -48,10 +48,6 @@ #include -#ifndef LINUX_VERSION_CODE -#include -#endif - #include "scsi_logging.h" #include "scsi_debug.h" - 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: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
On Wed, Mar 02, Alan Stern wrote: > This is a known bug in the way the SCSI midlayer interacts with the driver > model core. It's not related to usb-storage or the patch you've been > trying out. You can unblock the rmmod process by unplugging the device. you are right, happens also with the vanilla kernel. - 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: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
On Thu, Feb 17, Alan Stern wrote: > On Thu, 17 Feb 2005, Olaf Hering wrote: > > > On Mon, Feb 14, Alan Stern wrote: > > > > > https://lists.one-eyed-alien.net/pipermail/usb-storage/2004-November/001201.html > > > > Alan, > > > > this patch seems to fix the crashes. Is it ready for production use, or > > should I wait for a differnt patch? > > It hasn't been tested very much. (Would you like to be a beta tester? :-) > Right now I'm in the middle of cleaning it up and submitting it to Matt > Dharm for official inclusion. When a device is plugged in, rmmod sd_mod fails, does that work for you? sda is already unregistered, but rmmod is stuck like that: rmmod D 000F4240 0 11501 4 (NOTLB) d7a03f1c 0086 db8b95a0 000f4240 0001e848 a4c98fc0 000f4236 c03b58c8 df666560 dfb4 e0dbc36c df666560 0246 e0dbc374 c02cfcbe 0001 df666560 c01171a0 e0dbc374 e0dbc374 c0165981 e0dbc37c e0dfdd40 Call Trace: [] __down+0x6e/0xd0 [] default_wake_function+0x0/0x10 [] dput+0x21/0x180 [] __down_failed+0x7/0xc [] kobject_release+0x0/0x10 [] .text.lock.driver+0x8/0x18 [] exit_sd+0x1d/0x46 [sd_mod] [] sys_delete_module+0x154/0x170 [] vfs_write+0xa7/0x110 [] sys_write+0x3c/0x70 [] sysenter_past_esp+0x52/0x79 - 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: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
On Thu, Feb 17, Alan Stern wrote: > It hasn't been tested very much. (Would you like to be a beta tester? :-) Lets just throw it at the customers. - 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: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
On Mon, Feb 14, Alan Stern wrote: > https://lists.one-eyed-alien.net/pipermail/usb-storage/2004-November/001201.html Alan, this patch seems to fix the crashes. Is it ready for production use, or should I wait for a differnt patch? - 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: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
On Mon, Feb 14, Alan Stern wrote: > On Mon, 14 Feb 2005, Olaf Hering wrote: > > > On Thu, Feb 10, Alan Stern wrote: > > > > > And Mike Anderson's response was > > > > > > http://marc.theaimsgroup.com/?l=linux-scsi&m=110538854224319&w=2 > > > > > > His explanation was "Currently scsi_host_cancel being called from > > > scsi_remove_host appears to not do anything as scsi_forget_host removes > > > the devices from the list it iterates over." I don't know whether this > > > problem has been fixed yet. > > > > So, does anyone else know if that has been fixed, are there any patches > > I can try? > > Just plugging it in and out with init=/bin/bash doesnt trigger the oops. > > In fact I wrote a patch back in November that ought to work around the > problem, assuming this really is the problem you are seeing. The patch > still applies with a few offsets. It's available at > > https://lists.one-eyed-alien.net/pipermail/usb-storage/2004-November/001201.html I will try this patch now. Here is another oops without this patch, removing and adding the stick with a few seconds delay between plug/unplug. 2.6.11-rc4-bk3-200502151447-usbtest Feb 16 13:09:50 cowberry kernel: usb 2-1: USB disconnect, address 7 Feb 16 13:09:50 cowberry udev[6257]: removing device node '/dev/sg0' Feb 16 13:09:50 cowberry kernel: Oops: kernel access of bad area, sig: 11 [#1] Feb 16 13:09:50 cowberry kernel: NIP: C0011544 LR: C0042884 SP: C1BF5D20 REGS: c1bf5c70 TRAP: 0300Not tainted Feb 16 13:09:50 cowberry kernel: MSR: 1032 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11 Feb 16 13:09:50 cowberry kernel: DAR: EF1F1E40, DSISR: 4000 Feb 16 13:09:50 cowberry kernel: TASK = c1acb160[53] 'khubd' THREAD: c1bf4000 Feb 16 13:09:50 cowberry kernel: Last syscall: 120 Feb 16 13:09:50 cowberry kernel: GPR00: C1BF5D20 C1ACB160 CA032210 EF1F1E3C DAE403CC CA03220C 1B5C8079 Feb 16 13:09:50 cowberry kernel: GPR08: FFFC CA42F070 CA032210 00020734 C07CF7B8 0004 Feb 16 13:09:50 cowberry kernel: GPR16: C07DFB9A C07DD9D0 C036 C07DFB4C C07CF7B8 C07DD800 C07CF7A0 C07DD800 Feb 16 13:09:50 cowberry kernel: GPR24: 0001 0001 CA032200 CA032210 251BFC30 C946FF0C Feb 16 13:09:50 cowberry kernel: NIP [c0011544] memcpy+0x1c/0x9c Feb 16 13:09:50 cowberry kernel: LR [c0042884] cache_flusharray+0x74/0xdc Feb 16 13:09:50 cowberry kernel: Call trace: Feb 16 13:09:50 cowberry kernel: [c00429f8] kmem_cache_free+0x68/0x84 Feb 16 13:09:50 cowberry kernel: [cdcd8128] scsi_destroy_command_freelist+0x4c/0x10c [scsi_mod] Feb 16 13:09:50 cowberry kernel: [cdcd86e8] scsi_host_dev_release+0x84/0xc0 [scsi_mod] Feb 16 13:09:50 cowberry kernel: [c01ce37c] device_release+0x30/0x64 Feb 16 13:09:50 cowberry kernel: [c01503e8] kobject_cleanup+0xc0/0xc4 Feb 16 13:09:50 cowberry kernel: [c01514e0] kref_put+0x60/0x70 Feb 16 13:09:50 cowberry kernel: [c0150318] kobject_put+0x24/0x34 Feb 16 13:09:50 cowberry kernel: [c01ce644] put_device+0x1c/0x2c Feb 16 13:09:50 cowberry kernel: [cdcd8624] scsi_host_put+0x14/0x24 [scsi_mod] Feb 16 13:09:50 cowberry kernel: [cdd49384] usb_stor_release_resources+0xf4/0x144 [usb_storage] Feb 16 13:09:50 cowberry kernel: [cdd49480] storage_disconnect+0xac/0x110 [usb_storage] Feb 16 13:09:50 cowberry kernel: [c021add0] usb_unbind_interface+0x94/0xd4 Feb 16 13:09:50 cowberry kernel: [c01cfdbc] device_release_driver+0x98/0x9c Feb 16 13:09:50 cowberry kernel: [c01cffb4] bus_remove_device+0xc0/0x12c Feb 16 13:09:50 cowberry kernel: [c01ce6f8] device_del+0xa4/0x114 Feb 16 13:09:50 cowberry udev[6265]: removing device node '/dev/sdb1' - 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: [linux-usb-devel] 2.6.11-rc3-bk5, oops in scsi_try_bus_reset
On Thu, Feb 10, Alan Stern wrote: > And Mike Anderson's response was > > http://marc.theaimsgroup.com/?l=linux-scsi&m=110538854224319&w=2 > > His explanation was "Currently scsi_host_cancel being called from > scsi_remove_host appears to not do anything as scsi_forget_host removes > the devices from the list it iterates over." I don't know whether this > problem has been fixed yet. So, does anyone else know if that has been fixed, are there any patches I can try? Just plugging it in and out with init=/bin/bash doesnt trigger the oops. - 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
2.6.11-rc3-bk5, oops in scsi_try_bus_reset
I see a few refcount handling bugs in the scsi and/or usb layer. With a vanilla kernel, plugging an usb stick in , and remove it a few times: usb 2-1: USB disconnect, address 4 Oops: kernel access of bad area, sig: 11 [#1] NIP: CDD3E424 LR: CDD05398 SP: C9713F40 REGS: c9713e90 TRAP: 0300Not tainted MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11 DAR: 0130, DSISR: 4000 TASK = cae312c0[6674] 'scsi_eh_2' THREAD: c9712000 Last syscall: -1 GPR00: 00010718 C9713F40 CAE312C0 CDD146D0 0001 9032 GPR08: CAABF078 CB604800 C2801200 44088028 C07C67B8 0004 GPR16: C07D8B9A C07D69D0 CDD3 C9713F90 C03B286C C03433D8 C9713FA8 CDD3 GPR24: CAABF078 C2801200 C9713FA0 CAABF078 FFF0 C1711600 NIP [cdd3e424] bus_reset+0x64/0x134 [usb_storage] LR [cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod] Call trace: [cdd05398] scsi_try_bus_reset+0x8c/0x104 [scsi_mod] [cdd068c4] scsi_error_handler+0x86c/0xe68 [scsi_mod] [c0006c2c] kernel_thread+0x44/0x60 Total memory = 192MB; using 512kB for hash table (at c050) Linux version 2.6.11-rc3-bk5-200502100455-usbtest ([EMAIL PROTECTED]) (gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)) #1 Thu Feb 10 05:07:02 UTC 2005 Found UniNorth memory controller & host bridge, revision: 8 Mapped at 0xfdf0 Found a Keylargo mac-io controller, rev: 3, mapped at 0xfde8 Processor NAP mode on idle enabled. PowerMac motherboard: PowerBook Pismo Found UniNorth PCI host bridge at 0xf000. Firmware bus number: 0->0 Found UniNorth PCI host bridge at 0xf200. Firmware bus number: 0->1 Found UniNorth PCI host bridge at 0xf400. Firmware bus number: 0->0 via-pmu: Server Mode is disabled PMU driver 2 initialized for Core99, firmware: 0c nvram: Checking bank 0... nvram: gen0=172, gen1=171 nvram: Active bank is: 0 nvram: OF partition at 0x210 nvram: XP partition at 0x1220 nvram: NR partition at 0x1320 On node 0 totalpages: 49152 DMA zone: 49152 pages, LIFO batch:12 Normal zone: 0 pages, LIFO batch:1 HighMem zone: 0 pages, LIFO batch:1 Built 1 zonelists Kernel command line: root=/dev/hda12 selinux=0 elevator=as quiet PowerMac using OpenPIC irq controller at 0x8004 OpenPIC Version 1.2 (4 CPUs and 64 IRQ sources) at fc62f000 OpenPIC timer frequency is 4.16 MHz PID hash table entries: 1024 (order: 10, 16384 bytes) GMT Delta read from XPRAM: 60 minutes, DST: off time_init: decrementer frequency = 24.966218 MHz Console: colour dummy device 80x25 pmac_zilog: i2c-modem detected, id: 1 Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) Memory: 188000k available (2884k kernel code, 1828k data, 208k init, 0k highmem) AGP special page: 0xcbfff000 Calibrating delay loop... 796.67 BogoMIPS (lpj=398336) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) checking if image is initramfs...it isn't (no cpio magic); looks like an initrd Freeing initrd memory: 1084k freed NET: Registered protocol family 16 PCI: Probing PCI hardware Can't get bus-range for /[EMAIL PROTECTED]/[EMAIL PROTECTED], assuming it starts at 0 Registering openpic with sysfs... Linux Plug and Play Support v0.97 (c) Adam Belay usbcore: registered new driver usbfs usbcore: registered new driver hub TC classifier action (bugs to netdev@oss.sgi.com cc [EMAIL PROTECTED]) Thermal assist unit using timers, shrink_timer: 2000 jiffies audit: initializing netlink socket (disabled) audit(1108027661.271:0): initialized VFS: Disk quotas dquot_6.5.1 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) Initializing Cryptographic API PCI: Enabling device :00:10.0 (0086 -> 0087) aty128fb: Invalid ROM signature 0 should be 0xaa55 aty128fb: BIOS not located, guessing timings. aty128fb: Rage128 LF M3 AGP [chip rev 0x0] 8M 128-bit SDR SGRAM (1:1) Console: switching to colour frame buffer device 128x48 Registered "ati" backlight controller, level: 10/15 fb0: ATY Rage128 frame buffer device on Rage128 LF M3 AGP no framebuffer address found for /[EMAIL PROTECTED]/ATY,[EMAIL PROTECTED]/ATY,RageM3pB isapnp: Write Data Register 0xa79 already used Generic RTC Driver v1.07 Macintosh non-volatile memory driver v1.1 serial8250_init: nothing to do on this board pmac_zilog: 0.6 (Benjamin Herrenschmidt <[EMAIL PROTECTED]>) ttyS0 at MMIO 0x80013020 (irq = 22) is a Z85c30 ESCC - Internal modem ttyS1 at MMIO 0x80013000 (irq = 23) is a Z85c30 ESCC - Infrared port io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered Floppy drive(s): fd0 is 2.88M IN from bad port 3f4 at c01e2774 floppy0: no floppy controllers found RAMDISK driver initialized: 16 RAM disks of 123456K size 1024 blocksize loop: loaded (max 8 devices) MacIO PCI driver attached to Keylargo chipset mediabay0: Registered KeyLargo media-bay mediabay0: powering down mediabay0: switching to 3 mediabay0: powering up mediabay0: enabling (kind:3) media
2.6.11rc2 prints disksize twice
I think its not a functional problem, but parts of the disk detection is printed twice. ... SCSI device sdc: 71096640 512-byte hdwr sectors (36401 MB) SCSI device sdc: drive cache: write through SCSI device sdc: 71096640 512-byte hdwr sectors (36401 MB) SCSI device sdc: drive cache: write through ... Loading sym0: <1010-66> rev 0x1 at pci :41:01.0 irq 103 kernel/drivers/ssym0: No NVRAM, ID 7, Fast-80, LVD, parity checking csi/scsi_mod.ko Loading kernel/drivers/scsi/sdsym0: SCSI BUS has been reset. _mod.ko Loadingscsi0 : sym-2.1.18n kernel/drivers/scsi/sr_mod.ko Loading kernel/drivers/scsi/scsi_transport_spi.ko Loading kernel/drivers/scsi/sym53c8xx_2/sym53c8xx.ko sym0:8: FAST-40 WIDE SCSI 80.0 MB/s ST (25.0 ns, offset 31) Vendor: IBM Model: IC35L036UCDY10-0 Rev: S28C Type: Direct-Access ANSI SCSI revision: 03 sym0:8:0: tagged command queuing enabled, command queue depth 16. target0:0:8: Beginning Domain Validation sym0:8: asynchronous. sym0:8: wide asynchronous. sym0:8: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 31) target0:0:8: Ending Domain Validation SCSI device sda: 71096640 512-byte hdwr sectors (36401 MB) SCSI device sda: drive cache: write through SCSI device sda: 71096640 512-byte hdwr sectors (36401 MB) SCSI device sda: drive cache: write through sda: sda2 sda3 sda4 Attached scsi disk sda at scsi0, channel 0, id 8, lun 0 sym0:9: FAST-40 WIDE SCSI 80.0 MB/s ST (25.0 ns, offset 31) Vendor: IBM Model: IC35L036UCDY10-0 Rev: S28C Type: Direct-Access ANSI SCSI revision: 03 sym0:9:0: tagged command queuing enabled, command queue depth 16. target0:0:9: Beginning Domain Validation sym0:9: asynchronous. sym0:9: wide asynchronous. sym0:9: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 31) target0:0:9: Ending Domain Validation SCSI device sdb: 71096640 512-byte hdwr sectors (36401 MB) SCSI device sdb: drive cache: write through SCSI device sdb: 71096640 512-byte hdwr sectors (36401 MB) SCSI device sdb: drive cache: write through sdb: sdb1 sdb2 sdb3 Attached scsi disk sdb at scsi0, channel 0, id 9, lun 0 sym0:10: FAST-40 WIDE SCSI 80.0 MB/s ST (25.0 ns, offset 31) Vendor: IBM Model: IC35L036UCDY10-0 Rev: S28C Type: Direct-Access ANSI SCSI revision: 03 sym0:10:0: tagged command queuing enabled, command queue depth 16. target0:0:10: Beginning Domain Validation sym0:10: asynchronous. sym0:10: wide asynchronous. sym0:10: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 31) target0:0:10: Ending Domain Validation SCSI device sdc: 71096640 512-byte hdwr sectors (36401 MB) SCSI device sdc: drive cache: write through SCSI device sdc: 71096640 512-byte hdwr sectors (36401 MB) SCSI device sdc: drive cache: write through sdc: sdc1 sdc2 sdc3 Attached scsi disk sdc at scsi0, channel 0, id 10, lun 0 Vendor: IBM Model: HSBPD4E PU3SCSI Rev: 0016 Type: Enclosure ANSI SCSI revision: 02 target0:0:15: Beginning Domain Validation target0:0:15: Ending Domain Validation sym1: <1010-66> rev 0x1 at pci :41:01.1 irq 104 sym1: No NVRAM, ID 7, Fast-80, LVD, parity checking sym1: SCSI BUS has been reset. scsi1 : sym-2.1.18n - 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