hpsa.c (01fb21870d96c83ae01072674e380ac51ebc58c8) hpsa.c (a23513e8413e02b7e34e96a03d6bfd1c1948ac00)
1/*
2 * Disk Array driver for HP Smart Array SAS controllers
3 * Copyright 2000, 2009 Hewlett-Packard Development Company, L.P.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
8 *

--- 183 unchanged lines hidden (view full) ---

192};
193
194static inline struct ctlr_info *sdev_to_hba(struct scsi_device *sdev)
195{
196 unsigned long *priv = shost_priv(sdev->host);
197 return (struct ctlr_info *) *priv;
198}
199
1/*
2 * Disk Array driver for HP Smart Array SAS controllers
3 * Copyright 2000, 2009 Hewlett-Packard Development Company, L.P.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
8 *

--- 183 unchanged lines hidden (view full) ---

192};
193
194static inline struct ctlr_info *sdev_to_hba(struct scsi_device *sdev)
195{
196 unsigned long *priv = shost_priv(sdev->host);
197 return (struct ctlr_info *) *priv;
198}
199
200static inline struct ctlr_info *shost_to_hba(struct Scsi_Host *sh)
201{
202 unsigned long *priv = shost_priv(sh);
203 return (struct ctlr_info *) *priv;
204}
205
200static struct task_struct *hpsa_scan_thread;
201static DEFINE_MUTEX(hpsa_scan_mutex);
202static LIST_HEAD(hpsa_scan_q);
203static int hpsa_scan_func(void *data);
204
205/**
206 * add_to_scan_list() - add controller to rescan queue
207 * @h: Pointer to the controller.

--- 168 unchanged lines hidden (view full) ---

376}
377
378static ssize_t host_store_rescan(struct device *dev,
379 struct device_attribute *attr,
380 const char *buf, size_t count)
381{
382 struct ctlr_info *h;
383 struct Scsi_Host *shost = class_to_shost(dev);
206static struct task_struct *hpsa_scan_thread;
207static DEFINE_MUTEX(hpsa_scan_mutex);
208static LIST_HEAD(hpsa_scan_q);
209static int hpsa_scan_func(void *data);
210
211/**
212 * add_to_scan_list() - add controller to rescan queue
213 * @h: Pointer to the controller.

--- 168 unchanged lines hidden (view full) ---

382}
383
384static ssize_t host_store_rescan(struct device *dev,
385 struct device_attribute *attr,
386 const char *buf, size_t count)
387{
388 struct ctlr_info *h;
389 struct Scsi_Host *shost = class_to_shost(dev);
384 unsigned long *priv = shost_priv(shost);
385 h = (struct ctlr_info *) *priv;
390 h = shost_to_hba(shost);
386 if (add_to_scan_list(h)) {
387 wake_up_process(hpsa_scan_thread);
388 wait_for_completion_interruptible(&h->scan_wait);
389 }
390 return count;
391}
392
393/* Enqueuing and dequeuing functions for cmdlists. */

--- 3423 unchanged lines hidden ---
391 if (add_to_scan_list(h)) {
392 wake_up_process(hpsa_scan_thread);
393 wait_for_completion_interruptible(&h->scan_wait);
394 }
395 return count;
396}
397
398/* Enqueuing and dequeuing functions for cmdlists. */

--- 3423 unchanged lines hidden ---