- 16 9月, 2009 1 次提交
-
-
由 David Brownell 提交于
Let attribute group vectors be declared "const". We'd like to let most attribute metadata live in read-only sections... this is a start. Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 22 6月, 2009 1 次提交
-
-
由 Hannes Reinecke 提交于
If a SCSI ULD driver sets blk_queue_prep_rq(), it should clean it up itself on remove(), and not from the bus callbacks. This removes the need to hook into bus->remove(), which should not be used at the same time as driver->remove(). [jejb: fix sdkp initialisation problem due to mismerge] Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 13 3月, 2009 1 次提交
-
-
由 Randy Dunlap 提交于
Warning(linux-2.6.28-git13//drivers/scsi/scsi_sysfs.c:1049): Excess function parameter 'dev' description in 'scsi_sysfs_add_host' Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 03 1月, 2009 1 次提交
-
-
由 Kay Sievers 提交于
[jejb: limit ioctl to returning 20 characters to avoid overrun on long device names and add a few more conversions] Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 09 10月, 2008 1 次提交
-
-
由 Jens Axboe 提交于
Right now SCSI and others do their own command timeout handling. Move those bits to the block layer. Instead of having a timer per command, we try to be a bit more clever and simply have one per-queue. This avoids the overhead of having to tear down and setup a timer for each command, so it will result in a lot less timer fiddling. Signed-off-by: NMike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
-
- 04 10月, 2008 1 次提交
-
-
由 James Bottomley 提交于
Brian King <brking@linux.vnet.ibm.com> reported that fibre channel devices can oops during scanning if their ports block (because the device goes from CREATED -> BLOCK -> RUNNING rather than CREATED -> BLOCK -> CREATED). Fix this by adding a new state: CREATED_BLOCK which can only transition back to CREATED and disallow the CREATED -> BLOCK transition. Now both the created and blocked states that the mid-layer recognises can include CREATED_BLOCK. Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 27 7月, 2008 1 次提交
-
-
由 Martin K. Petersen 提交于
Controllers that support protection information must indicate this to the SCSI midlayer so that the ULD can prepare scsi_cmnds accordingly. This patch implements a host mask and various types of protection: - DIF Type 1-3 (between HBA and disk) - DIX Type 0-3 (between OS and HBA) The patch also allows the HBA to set the guard type to something different than the T10-mandated CRC. Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 05 6月, 2008 1 次提交
-
-
由 Chandra Seetharaman 提交于
Some of the storage devices (that can be accessed through multiple paths), do need some special handling for 1. Activating the passive path of the storage access. 2. Decode and handle the special sense codes returned by the devices. 3. Handle the I/Os being sent to the passive path, especially during the device probe time. when accessed through multiple paths. As of today this special device handling is done at the dm-multipath layer using dm-handlers. That works well for (1); for (2) to be handled at dm layer, scsi sense information need to be exported from SCSI to dm-layer, which is not very attractive; (3) cannot be done at all at the dm layer. Device handler has been moved to SCSI mainly to handle (2) and (3) properly. Signed-off-by: NChandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: NMike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: NMike Christie <michaelc@cs.wisc.edu> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 24 5月, 2008 1 次提交
-
-
由 James Bottomley 提交于
Reported-by: NSitsofe Wheeler <sitsofe@yahoo.com> > BUG: unable to handle kernel paging request at e6f17fac > IP: [<c02604d6>] 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:[<c02604d6>] 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: 0068 The problem is caused by: commit b0ed4336 Author: Hannes Reinecke <hare@suse.de> 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: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 23 4月, 2008 4 次提交
-
-
由 FUJITA Tomonori 提交于
This patch adds release callback support, which is called when a bsg device goes away. bsg_register_queue() takes a pointer to a callback function. This feature is useful for stuff like sas_host that can't use the release callback in struct device. If a caller doesn't need bsg's release callback, it can call bsg_register_queue() with NULL pointer (e.g. scsi devices can use release callback in struct device so they don't need bsg's callback). With this patch, bsg uses kref for refcounts on bsg devices instead of get/put_device in fops->open/release. bsg calls put_device and the caller's release callback (if it was registered) in kref_put's release. Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 James Bottomley 提交于
The current target allocation code registeres each possible target with sysfs; it will be deleted again if no useable LUN on this target was found. This results in a string of 'target add/target remove' uevents. Based on a patch by Hannes Reinecke <hare@suse.de> this patch reworks the target allocation code so that only uevents for existing targets are sent. The sysfs registration is split off from the existing scsi_target_alloc() into a in a new scsi_add_target() function, which should be called whenever an existing target is found. Only then a uevent is sent, so we'll be generating events for existing targets only. Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Hannes Reinecke 提交于
This patch removes the unused sysfs attibute overwriting logic for the scsi host attibutes, and plugs them into the driver core default attribute creation. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Hannes Reinecke 提交于
This patch implements scsi_host and scsi_target device types and adds both to the scsi_bus. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 20 4月, 2008 1 次提交
-
-
由 Tony Jones 提交于
It's big, but there doesn't seem to be a way to split it up smaller... Signed-off-by: NTony Jones <tonyj@suse.de> Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 27 3月, 2008 1 次提交
-
-
由 James Bottomley 提交于
This reverts commit 4b6f5b3a. bsg takes a reference to the underlying generic device, so it's impossible to unregister bsg in the device release routine. Acked-by: NFUJITA Tomonori <tomof@acm.org> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 14 3月, 2008 1 次提交
-
-
由 Mike Christie 提交于
Delay bsg unregistration, because we want to wait until all the request/cmds have released their reference. Signed-off-by: NMike Christie <michaelc@cs.wisc.edu> Acked-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 24 1月, 2008 1 次提交
-
-
由 James Bottomley 提交于
While trying to convert the SPI transport class to attribute groups, I discovered that we don't actually have any transport configure points for either the target or the host. This patch adds these missing transport class triggers. The host one is simply done after the add, the target one tries to be more clever and add it after devices may have been placed on the target (so the device configure will have set up the target parameters). Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 03 1月, 2008 1 次提交
-
-
由 James Bottomley 提交于
A recent bug report: http://bugzilla.kernel.org/show_bug.cgi?id=9674 Was caused because the ULDs now set their own prep functions, but don't necessarily reset the prep function back to the SCSI default when they are removed. This leads to panics if commands are sent to the device after the module is removed because the prep_fn is still pointing to the old module code. The fix for this is to implement a bus remove method that resets the prep_fn pointer correctly before calling the ULD specific driver remove method. Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
- 04 11月, 2007 1 次提交
-
-
由 Jeff Garzik 提交于
Originally based on a patch by Kristen Carlson Accardi @ Intel. Copious input from James Bottomley. Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 18 10月, 2007 1 次提交
-
-
由 James Bottomley 提交于
if shost->supported mode is zero (i.e. MODE_UNKNOWN) show it as initiator (it's obviously an unconverted driver that won't do target). Acked-by: NFUJITA Tomonori <tomof@acm.org> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 13 10月, 2007 4 次提交
-
-
由 Kay Sievers 提交于
This changes the uevent buffer functions to use a struct instead of a long list of parameters. It does no longer require the caller to do the proper buffer termination and size accounting, which is currently wrong in some places. It fixes a known bug where parts of the uevent environment are overwritten because of wrong index calculations. Many thanks to Mathieu Desnoyers for finding bugs and improving the error handling. Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Kay Sievers 提交于
Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
由 Kay Sievers 提交于
This removes the unused sysfs attribute overwriting logic for most of the attributes, and plugs them into the driver core default attribute creation. Without this patch, at the time of the events for the SCSI LUN's, there will be no sysfs files, because their creation is delayed until the sd driver has spun up the disks, which might take several seconds. It is the last WAIT_FOR_SYSFS rule in the default udev setup which can be removed with this change. Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
由 FUJITA Tomonori 提交于
This adds supported_mode and active_mode attributes to /sys/class/sys_host/hostX/ for specifying the mode that a lld supports and the currently activated mode. The output format is similar to fc rport roles: luce:/sys/class/scsi_host/host0$ cat supported_mode Initiator luce:/sys/class/scsi_host/host0$ cat active_mode Initiator The mode values uses bitmap since we would support dual-mode llds in the future like this: luce:/sys/class/scsi_host/host0$ cat supported_mode Initiator, Target The supported_mode attribute looks at a scsi_host_template and the active_mode attribute looks at a scsi_host. We would add a hook to a scsi_host_template to change the active_mode attribute dynamically. But now there is no hook since no lld supports that feature. Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: NMike Christie <michaelc@cs.wisc.edu> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 21 7月, 2007 1 次提交
-
-
由 James Bottomley 提交于
Currently, bsg doesn't make class backlinks (a process whereby you'd get a link to bsg in the device directory in the same way you get one for sg). This is because the bsg device is uninitialised, so the class device has nothing it can attach to. The fix is to make the bsg device point to the cdevice of the entity creating the bsg, necessitating changing the bsg_register_queue() prototype into a form that takes the generic device. Acked-by: NFUJITA Tomonori <tomof@acm.org> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 20 7月, 2007 1 次提交
-
-
由 James Bottomley 提交于
This patch moves the bsg registration into SCSI so that bsg no longer has a dependency on the scsi_interface_register API. This can be viewed as a temporary expedient until we can get universal bsg binding sorted out properly. Also use the sdev bus_id as the generic bsg name (to avoid clashes with the queue name). Acked-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: NJens Axboe <jens.axboe@oracle.com> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 19 7月, 2007 1 次提交
-
-
由 Adrian Bunk 提交于
This patch contains the following cleanups: - make needlessly global functions static - every file should #include the headers containing the prototypes for it's global functions Signed-off-by: NAdrian Bunk <bunk@stusta.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 22 5月, 2007 1 次提交
-
-
由 Tejun Heo 提交于
With libata converted to use sdev->manage_start_stop for suspend and resume, sht->suspend/resume() has no user left and low level suspend/ressume should be taken care of by low level driver's suspend/resume callbacks (e.g. PCI or PCMCIA driver callbacks). This patch removes sht->suspend/resume() callbacks. This change is suggested by Christoph Hellwig. Signed-off-by: NTejun Heo <htejun@gmail.com> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 18 4月, 2007 1 次提交
-
-
由 Michael Tokarev 提交于
The following patch adds support for sysfs/uevent modalias attribute for scsi devices (like disks, tapes, cdroms etc), based on whatever current sd.c, sr.c, st.c and osst.c drivers supports. The modalias format is like this: scsi:type-0x04 (for TYPE_WORM, handled by sr.c now). Several comments. o This hexadecimal type value is because all TYPE_XXX constants in include/scsi/scsi.h are given in hex, but __stringify() will not convert them to decimal (so it will NOT be scsi:type-4). Since it does not really matter in which format it is, while both modalias in module and modalias attribute match each other, I descided to go for that 0x%02x format (and added a comment in include/scsi/scsi.h to keep them that way), instead of changing them all to decimal. o There was no .uevent routine for SCSI bus. It might be a good idea to add some more ueven environment variables in there. o osst.c driver handles tapes too, like st.c, but only SOME tapes. With this setup, hotplug scripts (or whatever is used by the user) will try to load both st and osst modules for all SCSI tapes found, because both modules have scsi:type-0x01 alias). It is not harmful, but one extra module is no good either. It is possible to solve this, by exporting more info in modalias attribute, including vendor and device identification strings, so that modalias becomes something like scsi:type-0x12:vendor-Adaptec LTD:device-OnStream Tape Drive and having that, match for all 3 attributes, not only device type. But oh well, vendor and device strings may be large, and they do contain spaces and whatnot. So I left them for now, awaiting for comments first. Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 21 3月, 2007 1 次提交
-
-
由 Tejun Heo 提交于
Implement SBC START/STOP management. sdev->mange_start_stop is added. When it's set to one, sd STOPs the device on suspend and shutdown and STARTs it on resume. sdev->manage_start_stop defaults is in sdev instead of scsi_disk cdev to allow ->slave_config() override the default configuration but is exported under scsi_disk sysfs node as sdev->allow_restart is. When manage_start_stop is zero (the default value), this patch doesn't introduce any behavior change. Signed-off-by: NTejun Heo <htejun@gmail.com> Rejections fixed and Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 16 3月, 2007 1 次提交
-
-
由 Alan Stern 提交于
This patch (as868) adds a helper routine for device drivers that need to set up a callback to perform some action in a different process's context. This is intended for use by attribute methods that want to unregister themselves or their parent device. Attribute method calls are mutually exclusive with unregistration, so such actions cannot be taken directly. Two attribute methods are converted to use the new helper routine: one for SCSI device deletion and one for System/390 ccwgroup devices. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Cc: Hugh Dickins <hugh@veritas.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Oliver Neukum <oneukum@suse.de> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 17 2月, 2007 1 次提交
-
-
由 Alan Stern 提交于
This patch will affect the CDB in INQUIRY commands sent to LUNs above 0 when LUN-0 reports a scsi_level of 0; the LUN bits will no longer be set in the second byte of the CDB. This is as it should be. Nevertheless, it's possible that some wacky device might be adversely affected. I doubt anyone will complain... Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 22 11月, 2006 1 次提交
-
-
由 David Howells 提交于
Pass the work_struct pointer to the work function rather than context data. The work function can use container_of() to work out the data. For the cases where the container of the work_struct may go away the moment the pending bit is cleared, it is made possible to defer the release of the structure by deferring the clearing of the pending bit. To make this work, an extra flag is introduced into the management side of the work_struct. This governs auto-release of the structure upon execution. Ordinarily, the work queue executor would release the work_struct for further scheduling or deallocation by clearing the pending bit prior to jumping to the work function. This means that, unless the driver makes some guarantee itself that the work_struct won't go away, the work function may not access anything else in the work_struct or its container lest they be deallocated.. This is a problem if the auxiliary data is taken away (as done by the last patch). However, if the pending bit is *not* cleared before jumping to the work function, then the work function *may* access the work_struct and its container with no problems. But then the work function must itself release the work_struct by calling work_release(). In most cases, automatic release is fine, so this is the default. Special initiators exist for the non-auto-release case (ending in _NAR). Signed-Off-By: NDavid Howells <dhowells@redhat.com>
-
- 26 10月, 2006 1 次提交
-
-
由 James Bottomley 提交于
Debugging TCQ issues has shown me this is a very useful parameter to be able to view. Add it to he host class parameters. Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 01 7月, 2006 1 次提交
-
-
由 Jörn Engel 提交于
Signed-off-by: NJörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: NAdrian Bunk <bunk@stusta.de>
-
- 10 6月, 2006 1 次提交
-
-
由 Tobias Klauser 提交于
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of the macro. Signed-off-by: NTobias Klauser <tklauser@nuerscht.ch> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 24 3月, 2006 1 次提交
-
-
由 Nigel Cunningham 提交于
At the moment libata doesn't pass pm_message_t down ata_device_suspend. This causes drives to be powered down when we just want a freeze, causing unnecessary wear and tear. This patch gets pm_message_t passed down so that it can be used to determine whether to power down the drive. Signed-off-by: NNigel Cunningham <nigel@suspend2.net> drivers/scsi/libata-core.c | 5 +++-- drivers/scsi/libata-scsi.c | 4 ++-- drivers/scsi/scsi_sysfs.c | 2 +- include/linux/libata.h | 4 ++-- include/scsi/scsi_host.h | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
- 28 2月, 2006 1 次提交
-
-
由 James Bottomley 提交于
In order to use the new execute_in_process_context() API, you have to provide it with the work storage, which I do in SCSI in scsi_device and scsi_target, but which also means that we can no longer queue up the target reaps, so instead I moved the target to a state model which allows target_alloc to detect if we've received a dying target and wait for it to be gone. Hopefully, this should also solve the target namespace race. Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 15 2月, 2006 1 次提交
-
-
由 James Bottomley 提交于
There's a bug in releasing scsi_device where the release function actually frees the block queue. However, the block queue release calls flush_work(), which requires process context (the scsi_device structure may release from irq context). Update the release function to invoke via the execute_in_process_context() API. Also clean up the scsi_target structure releasing via this API. Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-
- 15 1月, 2006 1 次提交
-
-
由 Christoph Hellwig 提交于
When James Smart fixed the issue of the userspace scan atributes crashing the system with the FC transport class he added a patch to let the transport class check if the parent is valid for a given transport class. When adding support for the integrated raid of fusion sas devices we ran into a problem with that, as it didn't allow adding virtual raid volumes without the transport class knowing about it. So this patch adds a user_scan attribute instead, that takes over from scsi_scan_host_selected if the transport class sets it and thus lets the transport class control the user-initiated scanning. As this plugs the hole about user-initiated scanning the target_parent hook goes away and we rely on callers of the scanning routines to do something sensible. For SAS this meant I had to switch from a spinlock to a mutex to synchronize the topology linked lists, in FC they were completely unsynchronized which seems wrong. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
-