Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292984
b: refs/heads/master
c: f8daa6e
h: refs/heads/master
v: v3
  • Loading branch information
Dan Williams authored and James Bottomley committed Feb 19, 2012
1 parent 7938398 commit 794cda5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b15ebe0b5d0b95aeb1d84cae3649df1e0e065e9b
refs/heads/master: f8daa6e6d83f60a721752cb53433bfdc1503b45f
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/libsas/sas_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int sas_register_ha(struct sas_ha_struct *sas_ha)
else if (sas_ha->lldd_queue_size == -1)
sas_ha->lldd_queue_size = 128; /* Sanity */

sas_ha->state = SAS_HA_REGISTERED;
set_bit(SAS_HA_REGISTERED, &sas_ha->state);
spin_lock_init(&sas_ha->state_lock);

error = sas_register_phys(sas_ha);
Expand Down Expand Up @@ -160,7 +160,7 @@ int sas_unregister_ha(struct sas_ha_struct *sas_ha)
/* Set the state to unregistered to avoid further
* events to be queued */
spin_lock_irqsave(&sas_ha->state_lock, flags);
sas_ha->state = SAS_HA_UNREGISTERED;
clear_bit(SAS_HA_REGISTERED, &sas_ha->state);
spin_unlock_irqrestore(&sas_ha->state_lock, flags);
scsi_flush_work(sas_ha->core.shost);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/libsas/sas_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static inline void sas_queue_event(int event, unsigned long *pending,
unsigned long flags;

spin_lock_irqsave(&sas_ha->state_lock, flags);
if (sas_ha->state != SAS_HA_UNREGISTERED)
if (test_bit(SAS_HA_REGISTERED, &sas_ha->state))
scsi_queue_work(sas_ha->core.shost, work);
spin_unlock_irqrestore(&sas_ha->state_lock, flags);
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/scsi/libsas.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,14 @@ struct sas_ha_event {

enum sas_ha_state {
SAS_HA_REGISTERED,
SAS_HA_UNREGISTERED
};

struct sas_ha_struct {
/* private: */
struct sas_ha_event ha_events[HA_NUM_EVENTS];
unsigned long pending;

enum sas_ha_state state;
unsigned long state;
spinlock_t state_lock;

struct scsi_core core;
Expand Down

0 comments on commit 794cda5

Please sign in to comment.