aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-22 14:36:49 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-22 14:36:49 -0400
commite6f194d8f6f50da6837af637b2fd839c34185f7a (patch)
treef3c479a2bc24d49a150ff183e2614ee0f76cb366 /include
parent7578634990fb47cc30083fbd812689aa6deacfc0 (diff)
parentb91421749a1840148d8c81637c03c0ace3f35269 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (60 commits) [SCSI] libsas: make ATA functions selectable by a config option [SCSI] bsg: unexport sg v3 helper functions [SCSI] bsg: fix bsg_unregister_queue [SCSI] bsg: make class backlinks [SCSI] 3w-9xxx: add support for 9690SA [SCSI] bsg: fix bsg_register_queue error path [SCSI] ESP: Increase ESP_BUS_TIMEOUT to 275. [SCSI] libsas: fix scr_read/write users and update the libata documentation [SCSI] mpt fusion: update Kconfig help [SCSI] scsi_transport_sas: add destructor for bsg [SCSI] iscsi_tcp: buggered kmalloc() [SCSI] qla2xxx: Update version number to 8.02.00-k2. [SCSI] qla2xxx: Add ISP25XX support. [SCSI] qla2xxx: Use pci_try_set_mwi(). [SCSI] qla2xxx: Use PCI-X/PCI-Express read control interfaces. [SCSI] qla2xxx: Re-factor isp_operations to static structures. [SCSI] qla2xxx: Validate mid-layer 'underflow' during check-condition handling. [SCSI] qla2xxx: Correct setting of 'current' and 'supported' speeds during FDMI registration. [SCSI] qla2xxx: Generalize iIDMA support. [SCSI] qla2xxx: Generalize FW-Interface-2 support. ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h5
-rw-r--r--include/linux/bsg.h4
-rw-r--r--include/linux/libata.h1
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/scsi/libsas.h15
-rw-r--r--include/scsi/sas_ata.h60
-rw-r--r--include/scsi/scsi_host.h2
-rw-r--r--include/scsi/scsi_transport_sas.h11
8 files changed, 91 insertions, 9 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index f78965fc6426..695e34964cb7 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -698,11 +698,6 @@ extern int blk_execute_rq(request_queue_t *, struct gendisk *,
698 struct request *, int); 698 struct request *, int);
699extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, 699extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *,
700 struct request *, int, rq_end_io_fn *); 700 struct request *, int, rq_end_io_fn *);
701extern int blk_fill_sghdr_rq(request_queue_t *, struct request *,
702 struct sg_io_hdr *, int);
703extern int blk_unmap_sghdr_rq(struct request *, struct sg_io_hdr *);
704extern int blk_complete_sghdr_rq(struct request *, struct sg_io_hdr *,
705 struct bio *);
706extern int blk_verify_command(unsigned char *, int); 701extern int blk_verify_command(unsigned char *, int);
707 702
708static inline request_queue_t *bdev_get_queue(struct block_device *bdev) 703static inline request_queue_t *bdev_get_queue(struct block_device *bdev)
diff --git a/include/linux/bsg.h b/include/linux/bsg.h
index 8547b10c388b..f415f89e0ac8 100644
--- a/include/linux/bsg.h
+++ b/include/linux/bsg.h
@@ -57,10 +57,10 @@ struct bsg_class_device {
57 struct request_queue *queue; 57 struct request_queue *queue;
58}; 58};
59 59
60extern int bsg_register_queue(struct request_queue *, const char *); 60extern int bsg_register_queue(struct request_queue *, struct device *, const char *);
61extern void bsg_unregister_queue(struct request_queue *); 61extern void bsg_unregister_queue(struct request_queue *);
62#else 62#else
63#define bsg_register_queue(disk, name) (0) 63#define bsg_register_queue(disk, dev, name) (0)
64#define bsg_unregister_queue(disk) do { } while (0) 64#define bsg_unregister_queue(disk) do { } while (0)
65#endif 65#endif
66 66
diff --git a/include/linux/libata.h b/include/linux/libata.h
index be5a43928c84..9aa6c10f7bb1 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -412,6 +412,7 @@ struct ata_queued_cmd {
412 ata_qc_cb_t complete_fn; 412 ata_qc_cb_t complete_fn;
413 413
414 void *private_data; 414 void *private_data;
415 void *lldd_task;
415}; 416};
416 417
417struct ata_port_stats { 418struct ata_port_stats {
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index ced4d3f76104..cbabb9c675c9 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2019,6 +2019,8 @@
2019 2019
2020#define PCI_VENDOR_ID_ARIMA 0x161f 2020#define PCI_VENDOR_ID_ARIMA 0x161f
2021 2021
2022#define PCI_VENDOR_ID_BROCADE 0x1657
2023
2022#define PCI_VENDOR_ID_SIBYTE 0x166d 2024#define PCI_VENDOR_ID_SIBYTE 0x166d
2023#define PCI_DEVICE_ID_BCM1250_PCI 0x0001 2025#define PCI_DEVICE_ID_BCM1250_PCI 0x0001
2024#define PCI_DEVICE_ID_BCM1250_HT 0x0002 2026#define PCI_DEVICE_ID_BCM1250_HT 0x0002
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 2e6bdc4e7a0a..df36461fe881 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -30,6 +30,7 @@
30#include <linux/timer.h> 30#include <linux/timer.h>
31#include <linux/pci.h> 31#include <linux/pci.h>
32#include <scsi/sas.h> 32#include <scsi/sas.h>
33#include <linux/libata.h>
33#include <linux/list.h> 34#include <linux/list.h>
34#include <asm/semaphore.h> 35#include <asm/semaphore.h>
35#include <scsi/scsi_device.h> 36#include <scsi/scsi_device.h>
@@ -165,6 +166,13 @@ struct sata_device {
165 166
166 u8 port_no; /* port number, if this is a PM (Port) */ 167 u8 port_no; /* port number, if this is a PM (Port) */
167 struct list_head children; /* PM Ports if this is a PM */ 168 struct list_head children; /* PM Ports if this is a PM */
169
170 struct ata_port *ap;
171 struct ata_host ata_host;
172 struct ata_taskfile tf;
173 u32 sstatus;
174 u32 serror;
175 u32 scontrol;
168}; 176};
169 177
170/* ---------- Domain device ---------- */ 178/* ---------- Domain device ---------- */
@@ -624,6 +632,7 @@ int sas_set_phy_speed(struct sas_phy *phy,
624 struct sas_phy_linkrates *rates); 632 struct sas_phy_linkrates *rates);
625int sas_phy_enable(struct sas_phy *phy, int enabled); 633int sas_phy_enable(struct sas_phy *phy, int enabled);
626int sas_phy_reset(struct sas_phy *phy, int hard_reset); 634int sas_phy_reset(struct sas_phy *phy, int hard_reset);
635int sas_queue_up(struct sas_task *task);
627extern int sas_queuecommand(struct scsi_cmnd *, 636extern int sas_queuecommand(struct scsi_cmnd *,
628 void (*scsi_done)(struct scsi_cmnd *)); 637 void (*scsi_done)(struct scsi_cmnd *));
629extern int sas_target_alloc(struct scsi_target *); 638extern int sas_target_alloc(struct scsi_target *);
@@ -661,4 +670,10 @@ int __sas_task_abort(struct sas_task *);
661int sas_eh_device_reset_handler(struct scsi_cmnd *cmd); 670int sas_eh_device_reset_handler(struct scsi_cmnd *cmd);
662int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd); 671int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd);
663 672
673extern void sas_target_destroy(struct scsi_target *);
674extern int sas_slave_alloc(struct scsi_device *);
675extern int sas_ioctl(struct scsi_device *sdev, int cmd, void __user *arg);
676
677extern int sas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
678 struct request *req);
664#endif /* _SASLIB_H_ */ 679#endif /* _SASLIB_H_ */
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h
new file mode 100644
index 000000000000..dd5edc915417
--- /dev/null
+++ b/include/scsi/sas_ata.h
@@ -0,0 +1,60 @@
1/*
2 * Support for SATA devices on Serial Attached SCSI (SAS) controllers
3 *
4 * Copyright (C) 2006 IBM Corporation
5 *
6 * Written by: Darrick J. Wong <djwong@us.ibm.com>, IBM Corporation
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * USA
22 *
23 */
24
25#ifndef _SAS_ATA_H_
26#define _SAS_ATA_H_
27
28#include <linux/libata.h>
29#include <scsi/libsas.h>
30
31#ifdef CONFIG_SCSI_SAS_ATA
32
33static inline int dev_is_sata(struct domain_device *dev)
34{
35 return (dev->rphy->identify.target_port_protocols & SAS_PROTOCOL_SATA);
36}
37
38int sas_ata_init_host_and_port(struct domain_device *found_dev,
39 struct scsi_target *starget);
40
41void sas_ata_task_abort(struct sas_task *task);
42
43#else
44
45
46static inline int dev_is_sata(struct domain_device *dev)
47{
48 return 0;
49}
50int sas_ata_init_host_and_port(struct domain_device *found_dev,
51 struct scsi_target *starget)
52{
53 return 0;
54}
55void sas_ata_task_abort(struct sas_task *task)
56{
57}
58#endif
59
60#endif /* _SAS_ATA_H_ */
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index ba07cf7c04ba..3b8a6a85c2f8 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -341,7 +341,7 @@ struct scsi_host_template {
341 /* 341 /*
342 * Name of proc directory 342 * Name of proc directory
343 */ 343 */
344 char *proc_name; 344 const char *proc_name;
345 345
346 /* 346 /*
347 * Used to store the procfs directory if a driver implements the 347 * Used to store the procfs directory if a driver implements the
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h
index 9aedc19820b0..abdfd2e27dd7 100644
--- a/include/scsi/scsi_transport_sas.h
+++ b/include/scsi/scsi_transport_sas.h
@@ -7,7 +7,7 @@
7 7
8struct scsi_transport_template; 8struct scsi_transport_template;
9struct sas_rphy; 9struct sas_rphy;
10 10struct request;
11 11
12enum sas_device_type { 12enum sas_device_type {
13 SAS_PHY_UNUSED, 13 SAS_PHY_UNUSED,
@@ -23,6 +23,12 @@ enum sas_protocol {
23 SAS_PROTOCOL_SSP = 0x08, 23 SAS_PROTOCOL_SSP = 0x08,
24}; 24};
25 25
26static inline int sas_protocol_ata(enum sas_protocol proto)
27{
28 return ((proto & SAS_PROTOCOL_SATA) ||
29 (proto & SAS_PROTOCOL_STP))? 1 : 0;
30}
31
26enum sas_linkrate { 32enum sas_linkrate {
27 /* These Values are defined in the SAS standard */ 33 /* These Values are defined in the SAS standard */
28 SAS_LINK_RATE_UNKNOWN = 0, 34 SAS_LINK_RATE_UNKNOWN = 0,
@@ -85,10 +91,12 @@ struct sas_phy {
85#define phy_to_shost(phy) \ 91#define phy_to_shost(phy) \
86 dev_to_shost((phy)->dev.parent) 92 dev_to_shost((phy)->dev.parent)
87 93
94struct request_queue;
88struct sas_rphy { 95struct sas_rphy {
89 struct device dev; 96 struct device dev;
90 struct sas_identify identify; 97 struct sas_identify identify;
91 struct list_head list; 98 struct list_head list;
99 struct request_queue *q;
92 u32 scsi_target_id; 100 u32 scsi_target_id;
93}; 101};
94 102
@@ -166,6 +174,7 @@ struct sas_function_template {
166 int (*phy_reset)(struct sas_phy *, int); 174 int (*phy_reset)(struct sas_phy *, int);
167 int (*phy_enable)(struct sas_phy *, int); 175 int (*phy_enable)(struct sas_phy *, int);
168 int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); 176 int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *);
177 int (*smp_handler)(struct Scsi_Host *, struct sas_rphy *, struct request *);
169}; 178};
170 179
171 180