aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi (follow)
AgeCommit message (Collapse)AuthorFilesLines
2005-08-08[SCSI] fix target scanning oops with fc transport classJames.Smart@Emulex.Com1-0/+8
We have some nasty issues with 2.6.12-rc6. Any request to scan on the lpfc or qla2xxx FC adapters will oops. What is happening is the system is defaulting to non-transport registered targets, which inherit the parent of the scan. On this second scan, performed by the attribute, the parent becomes the shost instead of the rport. The slave functions in the 2 FC adapters use starget_to_rport() routines, which incorrectly map the shost as an rport pointer. Additionally, this pointed out other weaknesses: - If the target structure is torn down outside of the transport, we have no method for it to be regenerated at the proper parent. - We have race conditions on the target being allocated by both the midlayer scan (parent=shost) and by the fc transport (parent=rport). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14[SCSI] fix function prototype warningJames Bottomley1-1/+1
int_to_scsilun() takes a pointer to a struct scsi_lun in it's prototype, so add this structure to scsi_device.h to avoid declaration inside function prototype warnings. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-14[SCSI] add int_to_scsilun() functionJames.Smart@Emulex.Com1-0/+1
One of the issues we had was reverting the midlayers lun value into the 8byte lun value that we wanted to send to the device. Historically, there's been some combination of byte swapping, setting high/low, etc. There's also been no common thread between how our driver did it and others. I also got very confused as to why byteswap routines were being used. Anyway, this patch is a LLDD-callable function that reverts the midlayer's lun value, stored in an int, to the 8-byte quantity (note: this is not the real 8byte quantity, just the same amount that scsilun_to_int() was able to convert and store originally). This also solves the dilemma of the thread: http://marc.theaimsgroup.com/?l=linux-kernel&m=112116767118981&w=2 A patch for the lpfc driver to use this function will be along in a few days (batched with other patches). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-11[SCSI] add TYPE_RBC to our type tableJames Bottomley1-2/+2
Here's a tiny update that means we print the correct ASCII type information Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-26[SCSI] remove scsi_cmnd->stateChristoph Hellwig1-1/+0
We never look at it except for the old megaraid driver that abuses it for sending internal commands. That usage can be fixed easily because those internal commands are single-threaded by a mutex and we can easily use a completion there. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-26[SCSI] remove scsi_cmnd->ownerChristoph Hellwig1-1/+0
never checked anywhere Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-26[SCSI] remove scsi_cmnd->abort_reasonChristoph Hellwig1-2/+0
Never used for anything but printing it out in debug routines. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-26[SCSI] remove scsi_cmnd.eh_stateChristoph Hellwig1-1/+0
it's never set to anything, and just three broken drivers are looking at it and doing odd things. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-26[SCSI] remove scsi_set_deviceChristoph Hellwig1-6/+0
scsi_add_host is the proper place to set the device, but people copy the scsi_set_device usage from older drivers again and again. note that this leaves some legacy drivers like qlogicisp/qlogicfc without pci association in sysfs, but they're scheduled to go away soon anyway. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-24[PATCH] I2O: Adaptec specific SG_IO access, firmware access through sysfs and 2400A workaroundMarkus Lidel1-0/+26
Changes: - Provide SG_IO access to BLOCK and EXECUTIVE class on Adaptec controllers - Use PRIVATE messages in SCSI-OSM because on some controllers normal SCSI class commands like READ or READ CAPACITY cause errors - Use new DMA and SG list creation function - Added workaround to limit sectors per request for Adaptec 2400A controllers Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-26Automatic merge of ../scsi-misc-2.6-old/James Bottomley4-1/+70
2005-05-26[SCSI] allow the HBA to reserve target and device private areasJames Bottomley1-0/+38
This patch basically allows any HBA attached to the SPI transport class to declare an extra area which the mid-layer will allocate as part of its device and target allocations. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-26[SCSI] Add target alloc/destroy callbacks to the host templateJames Bottomley2-1/+28
This gives the HBA driver notice when a target is created and destroyed to allow it to manage its own target based allocations accordingly. This is a much reduced verson of the original patch sent in by James.Smart@Emulex.com Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-26[SCSI] TYPE_RBC cache fixes (sbp2.c affected)Al Viro1-0/+1
a) TYPE_SDAD renamed to TYPE_RBC and taken to scsi.h b) in sbp2.c remapping of TYPE_RPB to TYPE_DISK turned off c) relevant places in midlayer and sd.c taught to accept TYPE_RBC d) sd.c::sd_read_cache_type() looks into page 6 when dealing with TYPE_RBC - these guys have writeback cache flag there and are not guaranteed to have page 8 at all. e) sd_read_cache_type() got an extra sanity check - it checks that it got the page it asked for before using its contents. And screams if mismatch had happened. Rationale: there are broken devices out there that are "helpful" enough to go for "I don't have a page you've asked for, here, have another one". For example, PL3507 had been caught doing just that... f) sbp2 sets sdev->use_10_for_rw and sdev->use_10_for_ms instead of bothering to remap READ6/WRITE6/MOD_SENSE, so most of the conversions in there are gone now. Incidentally, I wonder if USB storage devices that have no mode page 8 are simply RBC ones. I haven't touched that, but it might be interesting to check... Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] implement parameter limits in the SPI transport classJames Bottomley1-0/+6
There's a basic need not to have parameters go under or over certain values when doing domain validation. The basic ones are max_offset, max_width and min_period This patch makes the transport class take and enforce these three limits. Currently they can be set by the user, although they could obviously be read from the HBA's on-board NVRAM area during slave_configure (if it has one). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] add scsi changer driverGerd Knorr1-0/+3
This patch adds a device driver for scsi media changer devices. Signed-off-by: Gerd Knorr <kraxel@bytesex.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18merge by hand (scsi_device.h)James Bottomley4-22/+30
2005-04-18[PATCH] scsi: remove volatile from scsi data2-3/+10
This patch removes volatile qualifier from scsi_device->device_busy, Scsi_Host->host_busy and ->host_failed as the volatile qualifiers don't serve any purpose now. While at it, convert those fields from unsigned short to unsigned int as suggested by Christoph. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18scsi: add DID_REQUEUE to the error handling1-0/+2
We have a DID_IMM_RETRY to require a retry at once, but we could do with a DID_REQUEUE to instruct the mid-layer to treat this command in the same manner as QUEUE_FULL or BUSY (i.e. halt the submission until another command returns ... or the queue pressure builds if there are no outstanding commands). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18[PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field1-13/+9
scsi_cmnd->serial_number_at_timeout doesn't serve any purpose anymore. All serial_number == serial_number_at_timeout tests are always true in abort callbacks. Kill the field. Also, as ->pid always equals ->serial_number and ->serial_number doesn't have any special meaning anymore, update comments above ->serial_number accordingly. Once we remove all uses of this field from all lldd's, this field should go. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18[PATCH] scsi: remove unused scsi_cmnd->internal_timeout field1-6/+0
scsi_cmnd->internal_timeout field doesn't have any meaning anymore. Kill the field. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18[PATCH] consolidate timeout defintions in scsi.h1-0/+9
Adapted from a patch in SuSE's kernel SRPM. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-16updates for CFQ oops fix1-0/+1
- add a comment to the device structure that the device_busy field is now protected by the request_queue->queue_lock - null out sdev->request_queue after the queue is released to trap any (and there shouldn't be any) use after the queue is freed. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-16[PATCH] fix NMI lockup with CFQ scheduler1-1/+0
The current problem seen is that the queue lock is actually in the SCSI device structure, so when that structure is freed on device release, we go boom if the queue tries to access the lock again. The fix here is to move the lock from the scsi_device to the queue. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-16Linux-2.6.12-rc2Linus Torvalds17-0/+3052
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!