Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254358
b: refs/heads/master
c: 1a38045
h: refs/heads/master
v: v3
  • Loading branch information
Dan Williams committed Jul 3, 2011
1 parent 55a69f6 commit 21e6af3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 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: d9c37390c4f02153188a64a7a89fa6798dc3ffc2
refs/heads/master: 1a38045ba88ed3bee6c57444670fb639c8b61be7
1 change: 0 additions & 1 deletion trunk/drivers/scsi/isci/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ void isci_port_init(

INIT_LIST_HEAD(&isci_port->remote_dev_list);
INIT_LIST_HEAD(&isci_port->domain_dev_list);
spin_lock_init(&isci_port->remote_device_lock);
spin_lock_init(&isci_port->state_lock);
init_completion(&isci_port->start_complete);
isci_port->isci_host = isci_host;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/scsi/isci/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ struct isci_port {
struct isci_host *isci_host;
struct asd_sas_port sas_port;
struct list_head remote_dev_list;
spinlock_t remote_device_lock;
spinlock_t state_lock;
struct list_head domain_dev_list;
struct completion start_complete;
Expand Down
14 changes: 5 additions & 9 deletions trunk/drivers/scsi/isci/remote_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,16 +287,13 @@ isci_remote_device_alloc(struct isci_host *ihost, struct isci_port *iport)
void isci_remote_device_ready(struct isci_remote_device *idev)
{
struct isci_host *ihost = idev->isci_port->isci_host;
unsigned long flags;

dev_dbg(&ihost->pdev->dev,
"%s: isci_device = %p\n", __func__, idev);
"%s: idev = %p\n", __func__, idev);

spin_lock_irqsave(&idev->isci_port->remote_device_lock, flags);
isci_remote_device_change_state(idev, isci_ready_for_io);
if (test_and_clear_bit(IDEV_START_PENDING, &idev->flags))
wake_up(&ihost->eventq);
spin_unlock_irqrestore(&idev->isci_port->remote_device_lock, flags);
}

/**
Expand Down Expand Up @@ -432,7 +429,6 @@ void isci_remote_device_gone(struct domain_device *dev)
*/
int isci_remote_device_found(struct domain_device *domain_dev)
{
unsigned long flags;
struct isci_host *isci_host;
struct isci_port *isci_port;
struct isci_phy *isci_phy;
Expand Down Expand Up @@ -474,25 +470,25 @@ int isci_remote_device_found(struct domain_device *domain_dev)
isci_remote_device_change_state(isci_device, isci_starting);


spin_lock_irqsave(&isci_port->remote_device_lock, flags);
spin_lock_irq(&isci_host->scic_lock);
list_add_tail(&isci_device->node, &isci_port->remote_dev_list);

set_bit(IDEV_START_PENDING, &isci_device->flags);
status = isci_remote_device_construct(isci_port, isci_device);
spin_unlock_irqrestore(&isci_port->remote_device_lock, flags);
spin_unlock_irq(&isci_host->scic_lock);

dev_dbg(&isci_host->pdev->dev,
"%s: isci_device = %p\n",
__func__, isci_device);

if (status != SCI_SUCCESS) {

spin_lock_irqsave(&isci_port->remote_device_lock, flags);
spin_lock_irq(&isci_host->scic_lock);
isci_remote_device_deconstruct(
isci_host,
isci_device
);
spin_unlock_irqrestore(&isci_port->remote_device_lock, flags);
spin_unlock_irq(&isci_host->scic_lock);
return -ENODEV;
}

Expand Down

0 comments on commit 21e6af3

Please sign in to comment.