include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / scsi / libsas / sas_discover.c
index 5f3a0d7..f583193 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include <linux/scatterlist.h>
+#include <linux/slab.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_eh.h>
 #include "sas_internal.h"
@@ -98,7 +99,7 @@ static int sas_get_port_device(struct asd_sas_port *port)
                        dev->dev_type = SATA_PM;
                else
                        dev->dev_type = SATA_DEV;
-               dev->tproto = SATA_PROTO;
+               dev->tproto = SAS_PROTOCOL_SATA;
        } else {
                struct sas_identify_frame *id =
                        (struct sas_identify_frame *) dev->frame_rcvd;
@@ -169,7 +170,7 @@ int sas_notify_lldd_dev_found(struct domain_device *dev)
                if (res) {
                        printk("sas: driver on pcidev %s cannot handle "
                               "device %llx, error:%d\n",
-                              sas_ha->dev->bus_id,
+                              dev_name(sas_ha->dev),
                               SAS_ADDR(dev->sas_addr), res);
                }
        }
@@ -295,11 +296,14 @@ static void sas_discover_domain(struct work_struct *work)
        case FANOUT_DEV:
                error = sas_discover_root_expander(dev);
                break;
-#ifdef CONFIG_SCSI_SAS_ATA
        case SATA_DEV:
        case SATA_PM:
+#ifdef CONFIG_SCSI_SAS_ATA
                error = sas_discover_sata(dev);
                break;
+#else
+               SAS_DPRINTK("ATA device seen but CONFIG_SCSI_SAS_ATA=N so cannot attach\n");
+               /* Fall through */
 #endif
        default:
                error = -ENXIO;