- 13 3月, 2009 40 次提交
-
-
由 Ilgu Hong 提交于
The buf[i] is a byte but we are only asking 4 bits off the group_id. This patch has us take off a byte. Signed-off-by: NIlgu Hong <ilgu.hong@promise.com> Signed-off-by: NMike Christie <michaelc@cs.wisc.edu> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 FUJITA Tomonori 提交于
No one uses scsi_execute_async with data transfer now. We can remove scsi_req_map_sg. Only scsi_eh_lock_door uses scsi_execute_async. scsi_eh_lock_door doesn't handle sense and the callback. So we can remove scsi_io_context too. Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 FUJITA Tomonori 提交于
This replaces scsi_execute_async with the block layer API. st does the same thing so it might make sense to have something like libst (there are other things that os and osst can share). Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Willem Riede <osst@riede.org> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 FUJITA Tomonori 提交于
This simiplifies the buffer management; all the buffers in osst_buffer become the same size. This is necessary to use the block layer API (sg driver was modified in the same way) since the block layer API takes the same size page frames instead of scatter gatter. Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Willem Riede <osst@riede.org> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
OSD in kernel source code is assumed to be at: drivers/scsi/osd/ with its own Makefile and Kconfig Add includes to them from drivers/scsi Makefile and Kconfig Add OSD to MAINTAINERS file Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Kconfig file for the drivers/scsi/osd subdirectory. Adds the following config items: config SCSI_OSD_INITIATOR config SCSI_OSD_ULD config SCSI_OSD_DPRINT_SENSE config SCSI_OSD_DEBUG Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Add osd.txt to Documentation/scsi/ Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Implementation of the osd_req_decode_sense() API. Can be called by library users to decode what failed in command executions. Add SCSI_OSD_DPRINT_SENSE Kconfig variable. Possible values are: 0 - Do not print any errors to messages file <KERN_ERR> 1 - (Default) Print only decoded errors that are not recoverable. Recoverable errors are those that the target has complied with the request but with a warning. For example read passed end of object will return zeros after the last valid byte. 2- Print all errors. Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Auto detect an OSDv2 or OSDv1 target at run time. Note how none of the OSD API calls change. The tests do not know what device version it is. This test now passes against both the IBM-OSD-SIM OSD1 target as well as OSC's OSD2 target. Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Add support for OSD2 at run time. It is now possible to run with both OSDv1 and OSDv2 targets at the same time. The actual detection should be preformed by the security manager, as the version is encoded in the capability structure. Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Some commands declared in header are not yet implemented. Put them as stubs in .c file, just so they take their place in the file Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Add support for the various List-objects commands. List-partitions-in-device, List-collections-in-partition, List-objects-in-partition, List-objects-in-collection. All these support partial listing and continuation. Add support for the different Flush commands and options. Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Layout the signing of OSD's CDB and all-data security modes. The actual code for signing the data and CDB is missing, but the code flow and the extra buffer segments are all in place. Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Support for both List-Mode and Page-Mode osd attributes. One of these operations may be added to most other operations. Define the OSD standard's attribute pages constants and structures (osd_attributes.h) Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Kernel clients like exofs can retrieve struct osd_dev(s) by means of below API. + osduld_path_lookup() - given a path (e.g "/dev/osd0") locks and returns the corresponding struct osd_dev, which is then needed for subsequent libosd use. + osduld_put_device() - free up use of an osd_dev. Devices can be shared by multiple clients. The osd_uld_device's life time is governed by an embedded kref structure. The osd_uld_device holds an extra reference to both it's char-device and it's scsi_device, and will release these just before the final deallocation. There are three possible lock sources of the osd_uld_device 1. First and for most is the probe() function called by scsi-ml upon a successful login into a target. Released in release() when logout. 2. Second by user-mode file handles opened on the char-dev. 3. Third is here by Kernel users. All three locks must be removed before the osd_uld_device is freed. The MODULE has three lock sources as well: 1. scsi-ml at probe() time, removed after release(). (login/logout) 2. The user-mode file handles open/close. 3. Import symbols by client modules like exofs. TODO: This API is not enough for the pNFS-objects LD. A more versatile API will be needed. Proposed API could be: struct osd_dev *osduld_sysid_lookup(const char id[OSD_SYSTEMID_LEN]); Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Add a Linux driver module that registers as a SCSI ULD and probes for OSD type SCSI devices. When an OSD-type SCSI device is found a character device is created in the form of /dev/osdX - where X goes from 0 up to hard coded 64. The Major character device number used is 260. Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Implementation of the most basic OSD functionality and infrastructure. Mainly Format, Create/Remove Partition, Create/Remove Object, and read/write. - Add Makefile and Kbuild to compile libosd.ko - osd_initiator.c Implementation file for osd_initiator.h and osd_sec.h APIs - osd_debug.h - Some kprintf macro definitions Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Headers only patch. osd_protocol.h Contains a C-fied definition of the T10 OSD standard osd_types.h Contains CPU order common used types osd_initiator.h API definition of the osd_initiator library osd_sec.h Contains High level API for the security manager. [Note that checkpatch spews errors on things that are valid in this context and will not be fixed] Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Reviewed-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
- Define the OSD_TYPE scsi device and let it show up in scans Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Boaz Harrosh 提交于
Allocate major 260 for osd. Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com> CC: Torben Mathiasen <device@lanana.org> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Tony Battersby 提交于
sg_io_owned needs to be set before the command is sent to the midlevel; otherwise, a quickly-completing command may cause a different CPU to see "srp->done == 1 && !srp->sg_io_owned", which would lead to incorrect behavior. Check srp->done and set srp->orphan while holding rq_list_lock to prevent races with sg_rq_end_io(). There is no need to check sfp->closed from read/write/ioctl/poll/etc. since the kernel guarantees that this won't happen. The usefulness of sg_srp_done() was questionable before; now it is definitely not needed. Signed-off-by: NTony Battersby <tonyb@cybernetics.com> Acked-by: NDouglas Gilbert <dgilbert@interlog.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Tony Battersby 提交于
sg has the following problems related to device removal: * opening a sg fd races with removing a device * closing a sg fd races with removing a device * /proc/scsi/sg/* access races with removing a device * command completion races with removing a device * command completion races with closing a sg fd * can rmmod sg with active commands These problems can cause kernel oopses, memory-use-after-free, or double-free errors. This patch fixes these problems by using krefs to manage the lifetime of sg_device and sg_fd. Each command submitted to the midlevel holds a reference to sg_fd until the completion callback. This ensures that sg_fd doesn't go away if the fd is closed with commands still outstanding. sg_fd gets the reference of sg_device (with scsi_device) and also makes sure that the sg module doesn't go away. /proc/scsi/sg/* functions don't play nicely with krefs because they give information about sg_fds which have been closed but not yet freed due to still having outstanding commands and sg_devices which have been removed but not yet freed due to still being referenced by one or more sg_fds. To deal with this safely without removing functionality, /proc functions now access sg_device and sg_fd while holding a lock instead of using kref_get()/kref_put(). Signed-off-by: NTony Battersby <tonyb@cybernetics.com> Acked-by: NDouglas Gilbert <dgilbert@interlog.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Ed Lin - PTU 提交于
Update version to 4.6.0000.1 Signed-off-by: NEd Lin <ed.lin@promise.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Ed Lin - PTU 提交于
Some small fixes, including: - add data direction in req_msg because new firmware version may require this (backward compatible) - change internal timeout value - change judgment of type st_vsc1 - blank line handling, etc. Signed-off-by: NEd Lin <ed.lin@promise.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Ed Lin - PTU 提交于
This is the fix for controller type st_yosemite, including - max_lun is 256 (backward compatible) - remove unneeded special handling of INQUIRY - remove unnecessary listing of sub device ids Signed-off-by: NEd Lin <ed.lin@promise.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Ed Lin - PTU 提交于
Add new device id for controller type st_seq. Signed-off-by: NEd Lin <ed.lin@promise.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Ed Lin - PTU 提交于
The interrupt routine is good for normal cases. However, if the firmware is abnormal and returns an invalid response, the driver may reuse a ccb structure that has already been handled. This may cause problem. Fix this by setting the req member to NULL. Next time we know the response is invalid and handle accordingly if req is NULL. Signed-off-by: NEd Lin <ed.lin@promise.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 James Bottomley 提交于
Fix up remaining bit of SUGGEST flag removal done by patch commit 0f10274300857d98ea5ea4c800c561a9ad9ac89f Author: Martin K. Petersen <martin.petersen@oracle.com> Date: Sun Jan 4 03:14:11 2009 -0500 [SCSI] Remove SUGGEST flags Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Martin K. Petersen 提交于
The SUGGEST_* flags in the SCSI command result have been out of fashion for a while and we don't actually use them in the error handling. Remove the remaining occurrences. Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Wayne Boyer 提交于
Enable MSI if available/supported. Signed-off-by: NWayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: NBrian King <brking@linux.vnet.ibm.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Christof Schmitt 提交于
Fix typo by adding closing parenthesis. Signed-off-by: NChristof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Aaro Koskinen 提交于
(The patch updated based on testing and comments from Tony Battersby.) Change the sym53c8xx_2 driver negotiation logic so that the driver will tolerate better device removals. Negotiation message(s) will be sent with every INQUIRY and REQUEST SENSE command, and whenever there is a change in goals or when the device reports check condition. The patch was made specifically to address the case where you hotswap the disk using remove-single-device/add-single-device commands through /proc/scsi/scsi. Without the patch the driver keeps using old transfer parameters even though the target is reset and reports check condition, so the data transfer of the very first INQUIRY will fail. Signed-off-by: NAaro Koskinen <Aaro.Koskinen@nokia.com> Tested-by: NTony Battersby <tonyb@cybernetics.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Robert Love 提交于
The Kconfig entry for SCSI_LOGGING refers the reader to drivers/scsi/scsi.c, but I didn't find any useful information there. There is certainly logging code in that file, but the logging types and logging levels are described in drivers/scsi/scsi_logging.h. Also, the procfs file referred to in the section is incorrect. It should be /proc/sys/dev/scsi/logging_level and not /proc/scsi/scsi. Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Hannes Reinecke 提交于
scsi_device_online() is not just a negation of SDEV_OFFLINE, also devices in state SDEV_DEL are actually offline. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Jan Engelhardt 提交于
Signed-off-by: NJan Engelhardt <jengelh@medozas.de> Acked-by: NJames Smart <James.Smart@Emulex.Com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 FUJITA Tomonori 提交于
I got the following warnings on IA64: drivers/scsi/libfc/fc_lport.c: In function 'fc_lport_recv_flogi_req': drivers/scsi/libfc/fc_lport.c:788: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64' drivers/scsi/libfc/fc_lport.c:792: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64' scsi/libfc/fc_rport.c: In function 'fc_rport_recv_plogi_req': /home/fujita/git/linux-2.6/drivers/scsi/libfc/fc_rport.c:968: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64' Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Robert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Randy Dunlap 提交于
libfc uses crc32 functions, so cause it to be built via select: drivers/built-in.o: In function `fc_frame_crc_check': (.text+0x75dae): undefined reference to `crc32_le' drivers/built-in.o: In function `fc_fcp_recv': fc_fcp.c:(.text+0x7b919): undefined reference to `crc32_le' fc_fcp.c:(.text+0x7b9d5): undefined reference to `crc32_le' fc_fcp.c:(.text+0x7ba54): undefined reference to `crc32_le' Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Acked-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Randy Dunlap 提交于
Fix scsi_debug build error: drivers/built-in.o: In function `resp_read': scsi_debug.c:(.text+0x21379a): undefined reference to `crc_t10dif' drivers/built-in.o: In function `resp_write': scsi_debug.c:(.text+0x213fca): undefined reference to `crc_t10dif' Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 Martin K. Petersen 提交于
This patch adds support for DIX and DIF in scsi_debug. A separate buffer is allocated for the protection information. - The dix parameter indicates whether the controller supports DIX (protection information DMA) - The dif parameter indicates whether the simulated storage device supports DIF - The guard parameter switches between T10 CRC(0) and IP checksum(1) - The ato parameter indicates whether the application tag is owned by the disk(0) or the OS(1) - DIF and DIX errors can be triggered using the scsi_debug_opts mask Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Acked-by: NDouglas Gilbert <dgilbert@interlog.com> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
-
由 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>
-