#
c1f99322 |
| 09-Apr-2024 |
Christoph Hellwig <hch@lst.de> |
scsi: sbp2: Switch to using ->device_configure
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per
scsi: sbp2: Switch to using ->device_configure
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors.
Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20240409143748.980206-14-hch@lst.de Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
5b7dfbef |
| 09-Apr-2024 |
Christoph Hellwig <hch@lst.de> |
scsi: core: Add a dma_alignment field to the host and host template
Get drivers out of the business of having to call the block layer DMA alignment limits helpers themselves.
Signed-off-by: Christo
scsi: core: Add a dma_alignment field to the host and host template
Get drivers out of the business of having to call the block layer DMA alignment limits helpers themselves.
Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20240409143748.980206-8-hch@lst.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
6371be7a |
| 20-Nov-2023 |
Damien Le Moal <dlemoal@kernel.org> |
scsi: Change SCSI device boolean fields to single bit flags
Commit 3cc2ffe5c16d ("scsi: sd: Differentiate system and runtime start/stop management") changed the single bit manage_start_stop flag int
scsi: Change SCSI device boolean fields to single bit flags
Commit 3cc2ffe5c16d ("scsi: sd: Differentiate system and runtime start/stop management") changed the single bit manage_start_stop flag into 2 boolean fields of the SCSI device structure. Commit 24eca2dce0f8 ("scsi: sd: Introduce manage_shutdown device flag") introduced the manage_shutdown boolean field for the same structure. Together, these 2 commits increase the size of struct scsi_device by 8 bytes by using booleans instead of defining the manage_xxx fields as single bit flags, similarly to other flags of this structure.
Avoid this unnecessary structure size increase and be consistent with the definition of other flags by reverting the definitions of the manage_xxx fields as single bit flags.
Fixes: 3cc2ffe5c16d ("scsi: sd: Differentiate system and runtime start/stop management") Fixes: 24eca2dce0f8 ("scsi: sd: Introduce manage_shutdown device flag") Cc: <stable@vger.kernel.org> Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20231120225631.37938-2-dlemoal@kernel.org Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
24eca2dc |
| 25-Oct-2023 |
Damien Le Moal <dlemoal@kernel.org> |
scsi: sd: Introduce manage_shutdown device flag
Commit aa3998dbeb3a ("ata: libata-scsi: Disable scsi device manage_system_start_stop") change setting the manage_system_start_stop flag to false for l
scsi: sd: Introduce manage_shutdown device flag
Commit aa3998dbeb3a ("ata: libata-scsi: Disable scsi device manage_system_start_stop") change setting the manage_system_start_stop flag to false for libata managed disks to enable libata internal management of disk suspend/resume. However, a side effect of this change is that on system shutdown, disks are no longer being stopped (set to standby mode with the heads unloaded). While this is not a critical issue, this unclean shutdown is not recommended and shows up with increased smart counters (e.g. the unexpected power loss counter "Unexpect_Power_Loss_Ct").
Instead of defining a shutdown driver method for all ATA adapter drivers (not all of them define that operation), this patch resolves this issue by further refining the sd driver start/stop control of disks using the new flag manage_shutdown. If this new flag is set to true by a low level driver, the function sd_shutdown() will issue a START STOP UNIT command with the start argument set to 0 when a disk needs to be powered off (suspended) on system power off, that is, when system_state is equal to SYSTEM_POWER_OFF.
Similarly to the other manage_xxx flags, the new manage_shutdown flag is exposed through sysfs as a read-write device attribute.
To avoid any confusion between manage_shutdown and manage_system_start_stop, the comments describing these flags in include/scsi/scsi.h are also improved.
Fixes: aa3998dbeb3a ("ata: libata-scsi: Disable scsi device manage_system_start_stop") Cc: stable@vger.kernel.org Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218038 Link: https://lore.kernel.org/all/cd397c88-bf53-4768-9ab8-9d107df9e613@gmail.com/ Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: James Bottomley <James.Bottomley@HansenPartnership.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
3cc2ffe5 |
| 15-Sep-2023 |
Damien Le Moal <dlemoal@kernel.org> |
scsi: sd: Differentiate system and runtime start/stop management
The underlying device and driver of a SCSI disk may have different system and runtime power mode control requirements. This is becaus
scsi: sd: Differentiate system and runtime start/stop management
The underlying device and driver of a SCSI disk may have different system and runtime power mode control requirements. This is because runtime power management affects only the SCSI disk, while system level power management affects all devices, including the controller for the SCSI disk.
For instance, issuing a START STOP UNIT command when a SCSI disk is runtime suspended and resumed is fine: the command is translated to a STANDBY IMMEDIATE command to spin down the ATA disk and to a VERIFY command to wake it up. The SCSI disk runtime operations have no effect on the ata port device used to connect the ATA disk. However, for system suspend/resume operations, the ATA port used to connect the device will also be suspended and resumed, with the resume operation requiring re-validating the device link and the device itself. In this case, issuing a VERIFY command to spinup the disk must be done before starting to revalidate the device, when the ata port is being resumed. In such case, we must not allow the SCSI disk driver to issue START STOP UNIT commands.
Allow a low level driver to refine the SCSI disk start/stop management by differentiating system and runtime cases with two new SCSI device flags: manage_system_start_stop and manage_runtime_start_stop. These new flags replace the current manage_start_stop flag. Drivers setting the manage_start_stop are modifed to set both new flags, thus preserving the existing start/stop management behavior. For backward compatibility, the old manage_start_stop sysfs device attribute is kept as a read-only attribute showing a value of 1 for devices enabling both new flags and 0 otherwise.
Fixes: 0a8589055936 ("ata,scsi: do not issue START STOP UNIT on resume") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
0ca31eca |
| 22-Mar-2023 |
Bart Van Assche <bvanassche@acm.org> |
scsi: firewire: sbp2: Declare the SCSI host template const
Make it explicit that the sbp2 host template it not modified.
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Bart Van Assch
scsi: firewire: sbp2: Declare the SCSI host template const
Make it explicit that the sbp2 host template it not modified.
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230322195515.1267197-6-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
94239738 |
| 09-Apr-2022 |
Jakob Koschel <jakobkoschel@gmail.com> |
firewire: remove check of list iterator against head past the loop body
When list_for_each_entry() completes the iteration over the whole list without breaking the loop, the iterator value will be a
firewire: remove check of list iterator against head past the loop body
When list_for_each_entry() completes the iteration over the whole list without breaking the loop, the iterator value will be a bogus pointer computed based on the head element.
While it is safe to use the pointer to determine if it was computed based on the head element, either with list_entry_is_head() or &pos->member == head, using the iterator variable after the loop should be avoided.
In preparation to limit the scope of a list iterator to the list traversal loop, use a dedicated pointer to point to the found element [1].
Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1] Cc: <stable@vger.kernel.org> Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20220409041243.603210-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
5e88e67b |
| 12-Oct-2021 |
Bart Van Assche <bvanassche@acm.org> |
scsi: firewire: sbp2: Switch to attribute groups
struct device supports attribute groups directly but does not support struct device_attribute directly. Hence switch to attribute groups.
Link: http
scsi: firewire: sbp2: Switch to attribute groups
struct device supports attribute groups directly but does not support struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-4-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
409d337e |
| 07-Oct-2021 |
Bart Van Assche <bvanassche@acm.org> |
scsi: firewire: sbp2: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call scsi_done() directly.
Link: https://lore.kernel.org/r/20211007202923.2174984-5-bvan
scsi: firewire: sbp2: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call scsi_done() directly.
Link: https://lore.kernel.org/r/20211007202923.2174984-5-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
1a59d1b8 |
| 27-May-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of th
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111 1307 usa
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 1334 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
a8cf59a6 |
| 16-Jan-2019 |
Christoph Hellwig <hch@lst.de> |
scsi: communicate max segment size to the DMA mapping code
When a host driver sets a maximum segment size we should not only propagate that setting to the block layer, which can merge segments, but
scsi: communicate max segment size to the DMA mapping code
When a host driver sets a maximum segment size we should not only propagate that setting to the block layer, which can merge segments, but also to the DMA mapping layer which can merge segments as well.
Fixes: 50c2e9107f ("scsi: introduce a max_segment_size host_template parameters") Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
2a3d4eb8 |
| 13-Dec-2018 |
Christoph Hellwig <hch@lst.de> |
scsi: flip the default on use_clustering
Most SCSI drivers want to enable "clustering", that is merging of segments so that they might span more than a single page. Remove the ENABLE_CLUSTERING def
scsi: flip the default on use_clustering
Most SCSI drivers want to enable "clustering", that is merging of segments so that they might span more than a single page. Remove the ENABLE_CLUSTERING define, and require drivers to explicitly set DISABLE_CLUSTERING to disable this feature.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
b84b1d52 |
| 29-Apr-2015 |
Hannes Reinecke <hare@suse.de> |
scsi: Do not set cmd_per_lun to 1 in the host template
'0' is now used as the default cmd_per_lun value, so there's no need to explicitly set it to '1' in the host template.
Signed-off-by: Hannes R
scsi: Do not set cmd_per_lun to 1 in the host template
'0' is now used as the default cmd_per_lun value, so there's no need to explicitly set it to '1' in the host template.
Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
show more ...
|
#
1f95f8c9 |
| 23-Jan-2015 |
Stefan Richter <stefanr@s5r6.in-berlin.de> |
firewire: sbp2: remove redundant check for bidi command
[Bart van Asche:] SCSI core never sets cmd->sc_data_direction to DMA_BIDIRECTIONAL; scsi_bidi_cmnd(cmd) should be used instead to test for a
firewire: sbp2: remove redundant check for bidi command
[Bart van Asche:] SCSI core never sets cmd->sc_data_direction to DMA_BIDIRECTIONAL; scsi_bidi_cmnd(cmd) should be used instead to test for a bidirectional command.
[Christoph Hellwig:] Bidirectional commands won't ever be queued anyway, unless a LLD or transport driver sets QUEUE_FLAG_BIDI.
So, simply remove the respective queuecommand check in the SBP-2 transport driver.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
show more ...
|
#
d737d7da |
| 03-Mar-2014 |
Stefan Richter <stefanr@s5r6.in-berlin.de> |
firewire: sbp2: replace card lock by target lock
firewire-core uses fw_card.lock to protect topology data and transaction data. firewire-sbp2 uses fw_card.lock for entirely unrelated purposes.
Int
firewire: sbp2: replace card lock by target lock
firewire-core uses fw_card.lock to protect topology data and transaction data. firewire-sbp2 uses fw_card.lock for entirely unrelated purposes.
Introduce a sbp2_target.lock to firewire-sbp2 and replace all fw_card.lock uses in the driver. fw_card.lock is now entirely private to firewire-core. This has no immediate advantage apart from making it clear in the code that firewire-sbp2 does not interact with the core via the core lock.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
show more ...
|
#
8e045a31 |
| 03-Mar-2014 |
Stefan Richter <stefanr@s5r6.in-berlin.de> |
firewire: sbp2: replace some spin_lock_irqsave by spin_lock_irq
Users of card->lock Calling context ------------------------------------------------------------------------ sbp2_status_write
firewire: sbp2: replace some spin_lock_irqsave by spin_lock_irq
Users of card->lock Calling context ------------------------------------------------------------------------ sbp2_status_write AR-req handler, tasklet complete_transaction AR-resp or AT-req handler, tasklet sbp2_send_orb among else scsi host .queuecommand, which may be called in some sort of atomic context sbp2_cancel_orbs sbp2_send_management_orb/ sbp2_{login,reconnect,remove}, worklet or process sbp2_scsi_abort, scsi eh thread sbp2_allow_block sbp2_login, worklet sbp2_conditionally_block among else complete_command_orb, tasklet sbp2_conditionally_unblock sbp2_{login,reconnect}, worklet sbp2_unblock sbp2_{login,remove}, worklet or process
Drop the IRQ flags saving from sbp2_cancel_orbs, sbp2_conditionally_unblock, and sbp2_unblock. It was already omitted in sbp2_allow_block.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
show more ...
|
#
0765cbd3 |
| 03-Mar-2014 |
Stefan Richter <stefanr@s5r6.in-berlin.de> |
firewire: sbp2: protect a reference counter properly
The assertion in the comment in sbp2_allow_block() is no longer true. Or maybe it never was true. At least now, the sole caller of sbp2_allow_bl
firewire: sbp2: protect a reference counter properly
The assertion in the comment in sbp2_allow_block() is no longer true. Or maybe it never was true. At least now, the sole caller of sbp2_allow_block(), sbp2_login, can run concurrently to one of sbp2_unblock()'s callers, sbp2_remove.
sbp2_login is performed by sbp2_logical_unit.work. sbp2_remove is performed by fw_device.work. sbp2_remove cancels sbp2_logical_unit.work, but only after it called sbp2_unblock.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
show more ...
|
#
70044d71 |
| 07-Mar-2014 |
Tejun Heo <tj@kernel.org> |
firewire: don't use PREPARE_DELAYED_WORK
PREPARE_[DELAYED_]WORK() are being phased out. They have few users and a nasty surprise in terms of reentrancy guarantee as workqueue considers work items t
firewire: don't use PREPARE_DELAYED_WORK
PREPARE_[DELAYED_]WORK() are being phased out. They have few users and a nasty surprise in terms of reentrancy guarantee as workqueue considers work items to be different if they don't have the same work function.
firewire core-device and sbp2 have been been multiplexing work items with multiple work functions. Introduce fw_device_workfn() and sbp2_lu_workfn() which invoke fw_device->workfn and sbp2_logical_unit->workfn respectively and always use the two functions as the work functions and update the users to set the ->workfn fields instead of overriding work functions using PREPARE_DELAYED_WORK().
This fixes a variety of possible regressions since a2c1c57be8d9 "workqueue: consider work function when searching for busy work items" due to which fw_workqueue lost its required non-reentrancy property.
Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: linux1394-devel@lists.sourceforge.net Cc: stable@vger.kernel.org # v3.9+ Cc: stable@vger.kernel.org # v3.8.2+ Cc: stable@vger.kernel.org # v3.4.60+ Cc: stable@vger.kernel.org # v3.2.40+
show more ...
|
#
ce027ed9 |
| 15-Dec-2013 |
Stefan Richter <stefanr@s5r6.in-berlin.de> |
firewire: sbp2: bring back WRITE SAME support
Commit 54b2b50c20a6 "[SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers" disabled WRITE SAME support for all SBP-2 attached targets. B
firewire: sbp2: bring back WRITE SAME support
Commit 54b2b50c20a6 "[SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers" disabled WRITE SAME support for all SBP-2 attached targets. But as described in the changelog of commit b0ea5f19d3d8 "firewire: sbp2: allow WRITE SAME and REPORT SUPPORTED OPERATION CODES", it is not required to blacklist WRITE SAME.
Bring the feature back by reverting the sbp2.c hunk of commit 54b2b50c20a6.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: stable@kernel.org
show more ...
|
#
54b2b50c |
| 23-Oct-2013 |
Martin K. Petersen <martin.petersen@oracle.com> |
[SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers
Some host adapters do not pass commands through to the target disk directly. Instead they provide an emulated target which may or
[SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers
Some host adapters do not pass commands through to the target disk directly. Instead they provide an emulated target which may or may not accurately report its capabilities. In some cases the physical device characteristics are reported even when the host adapter is processing commands on the device's behalf. This can lead to adapter firmware hangs or excessive I/O errors.
This patch disables WRITE SAME for devices connected to host adapters that provide an emulated target. Driver writers can disable WRITE SAME by setting the no_write_same flag in the host adapter template.
[jejb: fix up rejections due to eh_deadline patch] Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Cc: stable@kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
show more ...
|
#
94a87157 |
| 09-Jun-2013 |
Stefan Richter <stefanr@s5r6.in-berlin.de> |
firewire: introduce fw_driver.probe and .remove methods
FireWire upper layer drivers are converted from generic struct driver.probe() and .remove() to bus-specific struct fw_driver.probe() a
firewire: introduce fw_driver.probe and .remove methods
FireWire upper layer drivers are converted from generic struct driver.probe() and .remove() to bus-specific struct fw_driver.probe() and .remove().
The new .probe() adds a const struct ieee1394_device_id *id argument, indicating the entry in the driver's device identifiers table which matched the fw_unit to be probed. This new argument is used by the snd-firewire-speakers driver to look up device-specific parameters and methods. There is at least one other FireWire audio driver currently in development in which this will be useful too.
The new .remove() drops the unused error return code.
Although all in-tree drivers are being converted to the new methods, support for the old methods is left in place in this commit. This allows public developer trees to merge this commit and then move to the new fw_driver methods.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Clemens Ladisch <clemens@ladisch.de> (for sound/firewire/) Cc: Peter Hurley <peter@hurleysoftware.com> (for drivers/staging/fwserial/)
show more ...
|
#
cfb0c9d1 |
| 24-Mar-2013 |
Stefan Richter <stefanr@s5r6.in-berlin.de> |
firewire: remove unnecessary alloc/OOM messages
These are redundant to log messages from the mm core.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
|
#
d6c8cefc |
| 24-Mar-2013 |
Stefan Richter <stefanr@s5r6.in-berlin.de> |
firewire: sbp2: replace BUG_ON by WARN_ON
No need to crash and burn if S/G element sizes cannot be set to our liking; just leave a message in the log.
Signed-off-by: Stefan Richter <stefanr@s5r6.in
firewire: sbp2: replace BUG_ON by WARN_ON
No need to crash and burn if S/G element sizes cannot be set to our liking; just leave a message in the log.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
show more ...
|
#
df7ce663 |
| 16-Mar-2013 |
Paul Bolle <pebolle@tiscali.nl> |
firewire: Remove two unneeded checks for macros
The old IEEE 1394 driver stack was removed in v2.6.37. That made the checks for two Kconfig (module) macros unneeded, since they will now always evalu
firewire: Remove two unneeded checks for macros
The old IEEE 1394 driver stack was removed in v2.6.37. That made the checks for two Kconfig (module) macros unneeded, since they will now always evaluate to true. Remove these two checks.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
show more ...
|
#
b0ea5f19 |
| 25-Nov-2012 |
Stefan Richter <stefanr@s5r6.in-berlin.de> |
firewire: sbp2: allow WRITE SAME and REPORT SUPPORTED OPERATION CODES
The commits 3c6bdaeab4fd "[SCSI] Add a report opcode helper" 5db44863b6eb "[SCSI] sd: Implement support for WRITE SAME"
firewire: sbp2: allow WRITE SAME and REPORT SUPPORTED OPERATION CODES
The commits 3c6bdaeab4fd "[SCSI] Add a report opcode helper" 5db44863b6eb "[SCSI] sd: Implement support for WRITE SAME" introduced in-kernel uses of the mentioned commands but cautiously blacklisted them for any IEEE 1394 (SBP-2/3) targets and some other transports.
I looked through a range of SBP devices and found that the blacklist flags can be removed:
The kernel never attempts these commands if the device's INQUIRY data claim a SCSI revision of less than 0x05. This is the case with all SBP devices that I checked, except for three more recent devices which claimed a revision of 0x05 i.e. conformance with SPC-3 (two devices based on the OXUF936QSE chip but having different firmwares, one based on OXUF934DSB.)
I tried "sg_opcodes" from sg3_utils on several older and newer devices and did not encounter any apparent firmware bugs with it. All devices returned Illegal Request/ Invalid command operation code and carried on. I furthermore tried "sg_write_same -U" on the OXUF934DSB device with the same result. Alas I did not have a TRIM enabled SSD available for these tests. All of the bridges were correctly identified by the kernel as "fully provisioned", CD-ROM devices aside.
The kernel won't issue WRITE SAME to fully provisioned devices, nor would it attempt REPORT SUPPORTED OPERATION CODES or WRITE SAME with UNMAP bit on devices which do not claim conformance to SPC-3 or later.
Hence let's remove the no_report_opcodes and no_write_same blacklist flags so that these commands can be used on newer targets with respective capabilities. I guess the Linux sbp-target could be such a target.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
show more ...
|