Skip to content

libsas fixes for 3.4

Dan Williams linux-ide linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 21 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12libsas: introduce sas_work to fix sas_drain_work vs sas_queue_workdrivers/scsi/libsas/sas_discover.c drivers/scsi/libsas/sas_event.c drivers/scsi/libsas/sas_init.c +4 more+83 -620 replies
2/12libsas: cleanup spurious calls to scsi_schedule_ehdrivers/scsi/libsas/sas_ata.c drivers/scsi/libsas/sas_scsi_host.c+0 -20 replies
3/12libata, libsas: introduce sched_eh and end_eh port opsdrivers/ata/libata-core.c drivers/ata/libata-eh.c drivers/scsi/libsas/sas_ata.c +7 more+134 -3710 replies
4/12libsas: fix sas_find_bcast_phy() in the presence of 'vacant' physdrivers/scsi/libsas/sas_expander.c+12 -50 replies
5/12libsas: fix sas_get_port_device regressiondrivers/scsi/libsas/sas_discover.c+5 -40 replies
6/12libsas: unify domain_device sas_rphy lifetimesdrivers/scsi/libsas/sas_discover.c drivers/scsi/libsas/sas_expander.c+10 -70 replies
7/12libsas: fix ata_eh clobbering ex_phys via smp_ata_check_readydrivers/scsi/libsas/sas_expander.c+15 -10 replies
8/12libata: make ata_print_id atomicdrivers/ata/libata-core.c drivers/ata/libata-scsi.c drivers/ata/libata.h+5 -50 replies
9/12libsas, libata: fix start of life for a sas ata_portdrivers/ata/libata-scsi.c drivers/scsi/ipr.c drivers/scsi/libsas/sas_ata.c +4 more+54 -481 reply
10/12scsi: fix eh wakeup (scsi_schedule_eh vs scsi_restart_operations)drivers/scsi/scsi_error.c+14 -02 replies
11/12libsas: fix false positive 'device attached' conditionsdrivers/scsi/libsas/sas_expander.c+8 -12 replies
12/12scsi_transport_sas: fix delete vs scan racedrivers/scsi/scsi_transport_sas.c+5 -15 replies

Reviews trailers per patch

4 of 12 patches have a Reviewed-by or Acked-by.

PatchJacek DaneckiTom JacksonMaciej PatelczykBartek NowakowskiJeff Garzik
1/12
2/12R-b
3/12A-b R-b A-b A-b
4/12
5/12T-b
6/12T-b
7/12T-b T-b T-b
8/12A-b
9/12A-b
10/12T-b
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [GIT PATCH 00/12] libsas fixes for 3.4

The following changes since commit cd8df932d894f3128c884e3ae1b2b484540513db:

[SCSI] qla4xxx: Update driver version to 5.02.00-k15 (2012-02-29 17:03:03 -0600)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isci.git tags/libsas-fixes

for you to fetch changes up to e81dcce46fdbb2c968d7314c2f19da3c2bba24d1:

scsi_transport_sas: fix delete vs scan race (2012-04-10 19:15:23 -0700)

----------------------------------------------------------------
libsas-fixes for 3.4-rc4

Regression fixes to stabilize the new workqueue and ata asynchronous error handling implementations that were merged for v3.4-rc1.

1/ fix sas_drain_work() which was stomping on 'work' entries while the
workqueue was manipulating them. user would see random crashes when trying to use scsi_transport_sas attributes for resets, or during discovery

2/ (2) longstanding bugs related to the fact that libata (inventor and
primary host_eh_scheduled user) had built-in assumptions of 1:1 Scsi_Host-to-ata_port relationship. The libsas 1:N arrangement magnified these problems when it gained async eh and began scheduling eh in more scenarios (sas-transports resets) in 3.4-rc1.

3/ lifetime fixes for the rphy since code that has a domain_device
reference expected to be able to de-reference rphy parameters.

4/ (3) fixes for expander discovery bugs, one a recent regression with
ata-eh clobbering expander-phy data as it polled leading to system crashes, a long standing bug that caused libsas to be incompatible with expanders that advertised "PHY_VACANT" in low order phy indexes, and a quirk for expanders that sometimes fail to zero the sas address when no device is attached.

5/ fix for a long-standing bug whereby hotunplug events during initial
host scan can cause a system crash

----------------------------------------------------------------

This is a reflow of the 26 patches in the libsas-eh-reworks-v15 branch to separate out the 12 fixes from the other feature development. These patches, save for the new "scsi: fix eh wakeup (scsi_schedule_eh vs scsi_restart_operations)", were all originally posted before the merge window opened, and have also appeared in -next for the same timeframe.

There is a mix of pure regression fixes and fixes for long-standing bugs in libsas. Some of the long-standing bug fixes are made worse / easier to trigger by the new async error handling scheme.

The largest patch in the series is "libata, libsas: introduce sched_eh and end_eh port ops" wants an ack from the ata folks, it has been on the list since March 10th.

Dan Williams (10):
libsas: introduce sas_work to fix sas_drain_work vs sas_queue_work libata, libsas: introduce sched_eh and end_eh port ops
libsas: fix sas_get_port_device regression
libsas: unify domain_device sas_rphy lifetimes
libsas: fix ata_eh clobbering ex_phys via smp_ata_check_ready
libata: make ata_print_id atomic
libsas, libata: fix start of life for a sas ata_port
scsi: fix eh wakeup (scsi_schedule_eh vs scsi_restart_operations)
libsas: fix false positive 'device attached' conditions
scsi_transport_sas: fix delete vs scan race

Maciej Trela (1):
libsas: cleanup spurious calls to scsi_schedule_eh

Thomas Jackson (1):
libsas: fix sas_find_bcast_phy() in the presence of 'vacant' phys

 drivers/ata/libata-core.c           |    8 +++-
 drivers/ata/libata-eh.c             |   57 +++++++++++++++++++++------
 drivers/ata/libata-scsi.c           |   35 +++++++++--------
 drivers/ata/libata.h                |    2 +-
 drivers/scsi/ipr.c                  |    6 ++-
 drivers/scsi/libsas/sas_ata.c       |   72 +++++++++++++++++++++--------------
 drivers/scsi/libsas/sas_discover.c  |   67 ++++++++++++++++++--------------
 drivers/scsi/libsas/sas_event.c     |   36 +++++++++---------
 drivers/scsi/libsas/sas_expander.c  |   56 +++++++++++++++++++++------
 drivers/scsi/libsas/sas_init.c      |   25 ++++++------
 drivers/scsi/libsas/sas_internal.h  |    6 +--
 drivers/scsi/libsas/sas_phy.c       |   21 ++++------
 drivers/scsi/libsas/sas_port.c      |   15 +++-----
 drivers/scsi/libsas/sas_scsi_host.c |   28 ++++++++++----
 drivers/scsi/scsi_error.c           |   14 +++++++
 drivers/scsi/scsi_transport_sas.c   |    6 ++-
 include/linux/libata.h              |    7 +++-
 include/scsi/libsas.h               |   44 ++++++++++++++++++---
 include/scsi/sas_ata.h              |    9 ++++-
 19 files changed, 343 insertions(+), 171 deletions(-)