10 Jul, 2008
1 commit
-
Signed-off-by: David Woodhouse
26 Jun, 2008
1 commit
-
The esp driver currently does hand rolled reference counting of its
target. It's much easier to do what it needs to do if it's plugged into
the mid-layer callbacks (target_alloc and target_destroy) which were
designed for this case, so do it this way and get rid of the internal
target reference count.Acked-by: David S. Miller
Cc: Stable Tree
Signed-off-by: James Bottomley
25 Jun, 2008
2 commits
-
OOPS reported by Friedrich Oslage
The problem here is that tp->starget is set every time a lun
is allocated for a particular target so we can catch the
sdev_target parent value.The reset handler uses the NULL'ness of this value to determine
which targets are active.But esp_slave_destroy() does not NULL out this value when appropriate.
So for every target that doesn't respond, the SCSI bus scan causes
a stale pointer to be left here, with ensuing crashes like you're
seeing.Signed-off-by: David S. Miller
Cc: Stable Tree
Signed-off-by: James Bottomley -
Timeouts are measured in jiffies, not in seconds.
Signed-off-by: Matthew Wilcox
Cc: Stable Tree
Signed-off-by: James Bottomley
16 Jun, 2008
2 commits
-
This fixes the following compile failure:
drivers/scsi/dpt_i2o.c:83: error: 'PROC_IA64' undeclared here (not in a function)Mark Salyzyn indicated that IA64 must report
itself as PROC_INTEL, so I've changed the comment for PROC_INTEL.Signed-off-by: Jeff Mahoney
Acked-by: Mark Salyzyn
Signed-off-by: James Bottomley -
commit 9c7701088a61cc0cf8a6e1c68d1e74e3cc2ee0b7
Author: Dave Young
Date: Tue Jan 22 14:01:34 2008 +0800scsi: use class iteration api
Isn't a correct replacement for the original hand rolled host
lookup. The problem is that class_find_child would get a reference to
the host's class device which is never released. Since the host class
device holds a reference to the host gendev, the host can never be
freed.In 2.6.26 we started using class_find_device, and this function also
gets a reference to the device, so we end up with an extra ref
and the host will not get released.This patch adds a put_device to balance the class_find_device() get. I
kept the scsi_host_get in scsi_host_lookup, because the target layer
is using scsi_host_lookup and it looks like it needs the SHOST_DEL
check.Signed-off-by: Mike Christie
Signed-off-by: James Bottomley
10 Jun, 2008
1 commit
-
Reported-by: Geert Uytterhoeven
If you delay 30s or more before mounting a CD after inserting it then
the kernel has the wrong value for the CD size.http://marc.info/?t=121276133000001
The problem is in sr_test_unit_ready(): the function eats unit
attentions without adjusting the sdev->changed status. This means
that when the CD signals changed media via unit attention, we can
ignore it. Fix by making sr_test_unit_ready() adjust the changed
status.Tested-by: Geert Uytterhoeven
Cc: Stable Tree
Signed-off-by: James Bottomley
04 Jun, 2008
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] qla2xxx: Update version number to 8.02.01-k4.
[SCSI] qla2xxx: Correct handling of AENs postings for vports.
[SCSI] qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event handling."
[SCSI] ibmvscsi: Non SCSI error status fixup
[SCSI] fusion mpt: fix target missing after resetting external raid
[SCSI] fix intermittent oops in scsi_bus_uevent
[SCSI] qla2xxx: Update version number to 8.02.01-k3.
[SCSI] qla2xxx: Revert "qla2xxx: Validate mid-layer 'underflow' during check-condition handling."
[SCSI] qla2xxx: Disable local-interrupts while polling for RISC status.
[SCSI] qla2xxx: Extend the 'fw_dump' SYSFS node the ability to initiate a firmware dump.
[SCSI] qla2xxx: Don't depend on mailbox return values while enabling FCE tracing.
[SCSI] qla2xxx: Convert vport_sem to a mutex
[SCSI] qla2xxx: firmware semaphore to mutex
[SCSI] qla2xxx: Correct locking within MSI-X interrupt handlers.
[SCSI] qla2xxx: Display driver version at module init-time.
[SCSI] qla2xxx: Return correct port_type to FC-transport for Vports.
31 May, 2008
3 commits
-
Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley -
Initialize all proper structure members in order to support
work-list vport processing. This code also properly acquires the
correct (physical hardware_lock) lock during work submission.Signed-off-by: Seokmann Ju
Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley -
This reverts commit bd2a1846b2313e32d0270151a31a6b8335384a20.
The original (prior to the reverted commit) code was correct.
Additionally, the vp_idx should be checked during MBA_PORT_UPDATE
in order for proper handling to take place for a given vport.Signed-off-by: Seokmann Ju
Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley
28 May, 2008
1 commit
-
Some versions of the Virtual I/O Server on Power
return 0x99 in the non-SCSI error status field as success,
rather than 0. This fixes the ibmvscsi driver to treat this
response as success.Signed-off-by: Brian King
Signed-off-by: James Bottomley
24 May, 2008
1 commit
-
Reported-by: Sitsofe Wheeler
> BUG: unable to handle kernel paging request at e6f17fac
> IP: [] scsi_bus_uevent+0x1/0x17
> *pde = 2714b163 *pte = 26f17160
> Oops: 0000 [#1] DEBUG_PAGEALLOC
> last sysfs file:
>
> Pid: 1, comm: swapper Not tainted (2.6.26-rc2-next-20080516skw #30)
> EIP: 0060:[] EFLAGS: 00010282 CPU: 0
> EIP is at scsi_bus_uevent+0x1/0x17
> EAX: e6f18014 EBX: e6f18014 ECX: c02604d5 EDX: e7173000
> ESI: e7173000 EDI: e7173000 EBP: e7851ca0 ESP: e7851c90
> DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068The problem is caused by:
commit b0ed43360fdca227048d88a08290365cb681c1a8
Author: Hannes Reinecke
Date: Tue Mar 18 14:32:28 2008 +0100[SCSI] add scsi_host and scsi_target to scsi_bus
which added scsi_bus_type to the struct scsi_target device. This
causes both the scsi_device and scsi_target to fire scsi_bus_uevents.
However, the actualy scsi_bus_uevent() call assumes blindly that it's
a struct scsi_device. Check for this and return immediately if it
isn't.Signed-off-by: James Bottomley
23 May, 2008
1 commit
-
drivers/scsi/aha152x.c:3585:60: warning: Using plain integer as NULL pointer
drivers/scsi/aha152x.c:3845:56: warning: Using plain integer as NULL pointer
drivers/scsi/qla1280.c:2814:37: warning: Using plain integer as NULL pointer
drivers/scsi/atp870u.c:750:47: warning: Using plain integer as NULL pointer
drivers/scsi/3w-9xxx.c:1281:36: warning: Using plain integer as NULL pointer
drivers/scsi/3w-9xxx.c:1293:36: warning: Using plain integer as NULL pointer
drivers/scsi/3w-9xxx.c:1301:35: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:447:10: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:457:10: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:479:24: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:483:22: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:1213:23: warning: Using plain integer as NULL pointer
drivers/scsi/hptiop.c:1214:23: warning: Using plain integer as NULL pointerSigned-off-by: Harvey Harrison
Signed-off-by: Linus Torvalds
22 May, 2008
1 commit
-
... and we have few enough places using the latter to make it
simpler to do search and replace...Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
21 May, 2008
1 commit
-
There is a race from when a device is created with device_create() and
then the drvdata is set with a call to dev_set_drvdata() in which a
sysfs file could be open, yet the drvdata will be NULL, causing all
sorts of bad things to happen.This patch fixes the problem by using the new function,
device_create_drvdata(). It fixes the problem in all of the scsi
drivers that need it.Cc: Kay Sievers
Cc: Doug Gilbert
Cc: James E.J. Bottomley
Signed-off-by: Greg Kroah-Hartman
15 May, 2008
10 commits
-
Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley -
This reverts commit 8084fe168a5252548cdddf2ed181c337fecd0523.
The midlayer should be given the oppotunity to interpret the
check-condition and based on scsi_cmnd->resid determine if a
transfer should be retried or failed.Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley -
Matthew Wilcox reported the following lockdep
warning:> =================================
> [INFO:inconsistentlockstate]
> 2.6.26-rc1-00115-g0340eda-dirty#60
> ---------------------------------
> inconsistent{hardirq-on-W}->{in-hardirq-W}usage.
> swapper/1[HC1[1]:SC0[0]:HE0:SE1]takes:
> (&ha->hardware_lock){+-..},at:[]qla2300_intr_handler+0x35/0x1f5
> {hardirq-on-W}statewasregisteredat:
> []__lock_acquire+0x459/0xb1d
> []__lock_acquire+0xad4/0xb1d
> []lock_acquire+0x68/0x82
> []qla2300_intr_handler+0x35/0x1f5
> []_spin_lock+0x24/0x4d
> []qla2300_intr_handler+0x35/0x1f5
> []qla2300_intr_handler+0x35/0x1f5
> []trace_hardirqs_on+0xe7/0x10e
> []qla2x00_mailbox_command+0x1c6/0x433
...
> other info that might help us debug this:
> no locks held by swapper/1.
>
> stack backtrace:
> Pid:1,comm:swapperNottainted2.6.26-rc1-00115-g0340eda-dirty#60
> []print_usage_bug+0x100/0x10a
> []mark_lock+0xaa/0x395
> []__lock_acquire+0x3f2/0xb1d
> []__lock_acquire+0xad4/0xb1d
> []lock_acquire+0x68/0x82
> []qla2300_intr_handler+0x35/0x1f5
> []_spin_lock+0x24/0x4d
> []qla2300_intr_handler+0x35/0x1f5
> []qla2300_intr_handler+0x35/0x1f5
> []handle_IRQ_event+0x13/0x3d
> []handle_fasteoi_irq+0x76/0xabWhich shows that lockdep is detecting the driver's
interrupt-handler is run in both process and interrupt context
with irqs-enabled in the former case.During init-time and error-recovery (after a RISC reset), the
driver disables interrupts and 'polls' for completions by calling
qla2x00_poll():static inline void
qla2x00_poll(scsi_qla_host_t *ha)
{
ha->isp_ops->intr_handler(0, ha);
}which in-turn calls the ISP registered interrupt handler. This
patch corrects it by disabling local interrupts during polling.Reviewed-by: Matthew Wilcox
Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley -
The user-initiated dump can be a useful tool in triaging complex
ISP and FC issues.Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley -
Recent firmwares no longer return the 'number of buffers' in
mailbox6. The original code may result in a potential panic
during a FW-dump process due to the driver misinterpreting the
size of the allocated buffer.Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley -
The semaphore vport_sem is used as a mutex. Convert it to the
mutex API.Signed-off-by: Matthias Kaehlcke
Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley -
Signed-off-by: Daniel Walker
Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley -
Both MSI-X vector handlers attempt to acquire the HA's
hardware_lock. This though requires that interrupts be
disabled/enabled during acquisition and release of the spinlock.Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley -
Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley -
For Vports, the port_type should be set to FC_PORTTYPE_NPIV.
Signed-off-by: Andrew Vasquez
Signed-off-by: James Bottomley
14 May, 2008
2 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] qla1280: Fix queue depth problem
[SCSI] aha152x: Fix oops on module removal
[SCSI] aha152x: fix init suspiciously returned 1, it should follow 0/-E convention
[SCSI] libiscsi regression in 2.6.25: fix setting of recv timer
[SCSI] libiscsi regression in 2.6.25: fix nop timer handling
[SCSI] gdth: fix Error: Driver 'gdth' is already registered, aborting...
[SCSI] gdth: fix timer handling -
The qla1280 driver was ANDing the output value of mailbox register
0 with (1 << target-number) to determine whether to enable queueing
on the target in question.But mailbox register 0 has the status code for the mailbox command
(in this case, Set Target Parameters). Potential values are:
/*
* ISP mailbox command complete status codes
*/So clearly that is in error. I can't think what the author of that
line was looking for in a mailbox register, so I just eliminated the
AND. flag is used later in the function, and I think that the later
usage was also wrong, though it was used to set values that aren't
used. Oh well, an overhaul of this driver is not what I want to do
now -- just a bugfix.After the fix, I found that my disks were getting a queue depth of
255, which is far too many. Most SCSI disks are limited to 32 or
64. In any case, there's no point, queueing up a bunch of commands
to the adapter that will just result in queue full or starve other
targets from being issued commands due to running out of internal
memory. So I dropped default queue depth to 32 (from which 1 is
subtracted elsewhere, giving net of 31).I tested with a Seagate ST336753LC, and results look good, so
I'm satisfied with this patch.Signed-off-by: Jeremy Higdon
Acked-by: Jes Sorensen
Cc: Stable Tree
Signed-off-by: James Bottomley
11 May, 2008
2 commits
-
Reported-by: Frank de Jong
> after trying to unload the module:
> BUG: unable to handle kernel paging request at 00100100
> IP: [] :aha152x:aha152x_exit+0x47/0x6a
> *pde = 00000000
> Oops: 0000 [#1] PREEMPT SMP
> Modules linked in: aha152x(-) w83781d hwmon_vid tun ne 8390 bonding
> usb_storage snd_usb_audio snd_usb_lib snd_rawmidi pwc snd_seq_device
> compat_ioctl32 snd_hwdep videodev v4l1_compat 3c59x mii intel_agp
> agpgart snd_pcm_oss snd_pcm snd_timer snd_page_alloc snd_mixer_oss snd
>
> Pid: 2837, comm: rmmod Not tainted (2.6.25.3 #1)
> EIP: 0060:[] EFLAGS: 00210212 CPU: 0
> EIP is at aha152x_exit+0x47/0x6a [aha152x]
> EAX: 00000001 EBX: 000ffdc4 ECX: f7c517a8 EDX: 00000001
> ESI: 00000000 EDI: 00000003 EBP: e7880000 ESP: e7881f58
> DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> Process rmmod (pid: 2837, ti=e7880000 task=f27eb580 task.ti=e7880000)
> Stack: fba03700 c01419d2 31616861 00783235 e795ee70 c0157709 b7f24000 e79ae000
> c0158271 ffffffff b7f25000 e79ae004 e795e370 b7f25000 e795e37c e795e370
> 009ae000 fba03700 00000880 e7881fa8 00000000 bf93ec20 bf93ec20 c0102faa
> Call Trace:
> [] sys_delete_module+0x112/0x1a0
> [] remove_vma+0x39/0x50
> [] do_munmap+0x181/0x1f0
> [] sysenter_past_esp+0x5f/0x85
> [] rsc_parse+0x0/0x3c0The problem is that the driver calls aha152x_release() under a
list_for_each_entry(). Unfortunately, aha152x_release() deletes from
the list in question. Fix this by using list_for_each_entry_safe().Cc: Stable Tree
Signed-off-by: James Bottomley -
Reported-by: Frank de Jong
> [1.] One line summary of the problem:
> linux-2.6.25.3, aha152x'->init suspiciously returned 1, it should
> follow 0/-E convention. The module / driver works okay. Unloading the
> module is impossible.The driver is apparently returning 0 on failure and 1 on success.
That's a bit unfortunate. Fix it by altering to -ENODEV and 0.Cc: Stable Tree
Signed-off-by: James Bottomley
09 May, 2008
2 commits
-
If the ping tmo is longer than the recv tmo then we could miss a window
where we were supposed to check the recv tmo. This happens because
the ping code will set the next timeout for the ping timeout, and if the
ping executes quickly there will be a long chunk of time before the
timer wakes up again.This patch has the ping processing code kick off a recv
tmo check when getting a nop in response to our ping.Signed-off-by: Mike Christie
Cc: Stable Tree
Signed-off-by: James Bottomley -
alpha:
drivers/scsi/dpt_i2o.c:1997: error: implicit declaration of function 'adpt_alpha_info'
drivers/scsi/dpt_i2o.c: At top level:
drivers/scsi/dpt_i2o.c:2032: warning: conflicting types for 'adpt_alpha_info'
drivers/scsi/dpt_i2o.c:2032: error: static declaration of 'adpt_alpha_info' follows non-static declaration
drivers/scsi/dpt_i2o.c:1997: error: previous implicit declaration of 'adpt_alpha_info' was hereDue to a copy-n-paste error in drivers/scsi/dpti.h.
Fix that up and remove some of the many daft static-declarations-in-a-header
which this driver enjoys.Cc: Miquel van Smoorenburg
Cc: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 May, 2008
3 commits
-
The following patch fixes a bug in the iscsi nop processing.
The target sends iscsi nops to ping the initiator and the
initiator has to send nops to reply and can send nops to
ping the target.In 2.6.25 we moved the nop processing to the kernel to handle
problems when the userspace daemon is not up, but the target
is pinging us, and to handle when scsi commands timeout, but
the transport may be the cause (we can send a nop to check
the transport). When we added this code we added a bug where
if the transport timer wakes at the exact same time we are supposed to check
for a nop timeout we drop the session instead of checking the transport.This patch checks if a iscsi ping is outstanding and if the ping has
timed out, to determine if we need to signal a connection problem.Signed-off-by: Mike Christie
Cc: Stable Tree
Signed-off-by: James Bottomley -
This message appears on modprobe/rmmod/modprobe of the driver. It's
caused because if the driver has no instances, it returns an error
from gdth_init, which causes the module to fail to load.
Unfortunately, the module's pci driver is still registered at this
point.Fix this by making gdth behave like a modern driver and insert even if
it doesn't find any instances (in case of hot plug or software driven
binding).Signed-off-by: James Bottomley
-
The global timer handling is problematic in that if someone unbinds a
PCI gdth instance, the BUG_ON() in the timer will cause a panic.Fix this by making the timer start and stop depending on whether there
are instances present. This should also permit binding and unbinding
to work.Signed-off-by: James Bottomley
06 May, 2008
1 commit
-
The new mac_esp scsi driver needs CONFIG_SCSI_SPI_ATTRS, just like all other
drivers using the new esp_scsi core.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Linus Torvalds
03 May, 2008
4 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6:
[SCSI] aic94xx: fix section mismatch
[SCSI] u14-34f: Fix 32bit only problem
[SCSI] dpt_i2o: sysfs code
[SCSI] dpt_i2o: 64 bit support
[SCSI] dpt_i2o: move from virt_to_bus/bus_to_virt to dma_alloc_coherent
[SCSI] dpt_i2o: use standard __init / __exit code
[SCSI] megaraid_sas: fix suspend/resume sections
[SCSI] aacraid: Add Power Management support
[SCSI] aacraid: Fix jbod operations scan issues
[SCSI] aacraid: Fix warning about macro side-effects
[SCSI] add support for variable length extended commands
[SCSI] Let scsi_cmnd->cmnd use request->cmd buffer
[SCSI] bsg: add large command support
[SCSI] aacraid: Fix down_interruptible() to check the return value correctly
[SCSI] megaraid_sas; Update the Version and Changelog
[SCSI] ibmvscsi: Handle non SCSI error status
[SCSI] bug fix for free list handling
[SCSI] ipr: Rename ipr's state scsi host attribute to prevent collisions
[SCSI] megaraid_mbox: fix Dell CERC firmware problem -
Fix following warnings:
WARNING: vmlinux.o(.data+0x17aa88): Section mismatch in reference from the variable asd_pcidev_data to the function .devinit.text:asd_aic9410_setup()
WARNING: vmlinux.o(.data+0x17aa98): Section mismatch in reference from the variable asd_pcidev_data to the function .devinit.text:asd_aic9410_setup()
WARNING: vmlinux.o(.data+0x17aaa8): Section mismatch in reference from the variable asd_pcidev_data to the function .devinit.text:asd_aic9405_setup()asd_pcidev_data is only used by __devinit asd_pci_probe. So mark is const and
annotate it __devinitconst to fix the warnings.[akpm@linux-foundation.org: fix warning]
Signed-off-by: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: James Bottomley -
Another user of 32bit time
Signed-off-by: Alan Cox
Signed-off-by: James Bottomley -
Create a /sys/class/dpt_i2o directory and populate it with
dptiN directories. Each dptiN directory contains a "dev" file
that makes udev create /dev/dptiNSigned-off-by: Miquel van Smoorenburg
Acked-by: Mark Salyzyn
Signed-off-by: James Bottomley