]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/libsas/sas_port.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-omap-h63xx.git] / drivers / scsi / libsas / sas_port.c
index e1e2d085c920918dc508d4ec8d67dfad98095450..139935a121b42a8eab5f1d5535db8adb8eca498f 100644 (file)
@@ -50,7 +50,7 @@ static void sas_form_port(struct asd_sas_phy *phy)
                        sas_deform_port(phy);
                else {
                        SAS_DPRINTK("%s: phy%d belongs to port%d already(%d)!\n",
-                                   __FUNCTION__, phy->id, phy->port->id,
+                                   __func__, phy->id, phy->port->id,
                                    phy->port->num_phys);
                        return;
                }
@@ -78,7 +78,7 @@ static void sas_form_port(struct asd_sas_phy *phy)
 
        if (i >= sas_ha->num_phys) {
                printk(KERN_NOTICE "%s: couldn't find a free port, bug?\n",
-                      __FUNCTION__);
+                      __func__);
                spin_unlock_irqrestore(&sas_ha->phy_port_lock, flags);
                return;
        }
@@ -92,9 +92,6 @@ static void sas_form_port(struct asd_sas_phy *phy)
        if (!port->phy)
                port->phy = phy->phy;
 
-       SAS_DPRINTK("phy%d added to port%d, phy_mask:0x%x\n", phy->id,
-                   port->id, port->phy_mask);
-
        if (*(u64 *)port->attached_sas_addr == 0) {
                port->class = phy->class;
                memcpy(port->attached_sas_addr, phy->attached_sas_addr,
@@ -115,6 +112,11 @@ static void sas_form_port(struct asd_sas_phy *phy)
        }
        sas_port_add_phy(port->port, phy->phy);
 
+       SAS_DPRINTK("%s added to %s, phy_mask:0x%x (%16llx)\n",
+                   phy->phy->dev.bus_id,port->port->dev.bus_id,
+                   port->phy_mask,
+                   SAS_ADDR(port->attached_sas_addr));
+
        if (port->port_dev)
                port->port_dev->pathways = port->num_phys;
 
@@ -255,12 +257,11 @@ void sas_porte_hard_reset(struct work_struct *work)
 static void sas_init_port(struct asd_sas_port *port,
                          struct sas_ha_struct *sas_ha, int i)
 {
+       memset(port, 0, sizeof(*port));
        port->id = i;
        INIT_LIST_HEAD(&port->dev_list);
        spin_lock_init(&port->phy_list_lock);
        INIT_LIST_HEAD(&port->phy_list);
-       port->num_phys = 0;
-       port->phy_mask = 0;
        port->ha = sas_ha;
 
        spin_lock_init(&port->dev_list_lock);