Thread (21 messages) 21 messages, 2 authors, 2012-01-23

Re: [PATCH v3 03/14] libsas: prevent domain rediscovery competing with ata error handling

From: Dan Williams <hidden>
Date: 2012-01-09 20:03:17
Also in: linux-scsi

On Mon, Jan 9, 2012 at 11:14 AM, Dan Williams [off-list ref] wrote:
On Thu, Jan 5, 2012 at 4:59 PM, Dan Williams [off-list ref] wrote:
quoted
+void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *dev)
+{
+       if (!list_empty(&dev->disco_list_node)) {
+               /* this rphy never saw sas_rphy_add */
+               list_del_init(&dev->disco_list_node);
+               sas_rphy_free(dev->rphy);
+               dev->rphy = NULL;
+               sas_unregister_common_dev(port, dev);
+       }
+
+       if (dev->rphy) {
+               sas_rphy_unlink(dev->rphy);
+
+               spin_lock_irq(&port->dev_list_lock);
+               list_move_tail(&dev->dev_list_node, &port->destroy_list);
+               spin_unlock_irq(&port->dev_list_lock);
This is too early to make the device appear removed from the domain.
Will revise the patch to re-use disco_list_node to for
port->destroy_list.
...we also need to clear the parent sas_port's rphy reference to get
sas_port_delete to skip its call to sas_rphy_delete and leave it to
the DISCE_DESTRUCT event.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help