aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_osm.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm.h')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.h64
1 files changed, 4 insertions, 60 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h
index 30c200d5bcd..8ffe2d3e1d9 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.h
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h
@@ -79,6 +79,8 @@
79#include <scsi/scsi_device.h> 79#include <scsi/scsi_device.h>
80#include <scsi/scsi_host.h> 80#include <scsi/scsi_host.h>
81#include <scsi/scsi_tcq.h> 81#include <scsi/scsi_tcq.h>
82#include <scsi/scsi_transport.h>
83#include <scsi/scsi_transport_spi.h>
82 84
83/* Core SCSI definitions */ 85/* Core SCSI definitions */
84#define AIC_LIB_PREFIX ahc 86#define AIC_LIB_PREFIX ahc
@@ -127,23 +129,6 @@ typedef struct scsi_cmnd *ahc_io_ctx_t;
127#define ahc_le32toh(x) le32_to_cpu(x) 129#define ahc_le32toh(x) le32_to_cpu(x)
128#define ahc_le64toh(x) le64_to_cpu(x) 130#define ahc_le64toh(x) le64_to_cpu(x)
129 131
130#ifndef LITTLE_ENDIAN
131#define LITTLE_ENDIAN 1234
132#endif
133
134#ifndef BIG_ENDIAN
135#define BIG_ENDIAN 4321
136#endif
137
138#ifndef BYTE_ORDER
139#if defined(__BIG_ENDIAN)
140#define BYTE_ORDER BIG_ENDIAN
141#endif
142#if defined(__LITTLE_ENDIAN)
143#define BYTE_ORDER LITTLE_ENDIAN
144#endif
145#endif /* BYTE_ORDER */
146
147/************************* Configuration Data *********************************/ 132/************************* Configuration Data *********************************/
148extern u_int aic7xxx_no_probe; 133extern u_int aic7xxx_no_probe;
149extern u_int aic7xxx_allow_memio; 134extern u_int aic7xxx_allow_memio;
@@ -283,35 +268,6 @@ ahc_scb_timer_reset(struct scb *scb, u_int usec)
283 268
284#define AIC7XXX_DRIVER_VERSION "6.2.36" 269#define AIC7XXX_DRIVER_VERSION "6.2.36"
285 270
286/**************************** Front End Queues ********************************/
287/*
288 * Data structure used to cast the Linux struct scsi_cmnd to something
289 * that allows us to use the queue macros. The linux structure has
290 * plenty of space to hold the links fields as required by the queue
291 * macros, but the queue macors require them to have the correct type.
292 */
293struct ahc_cmd_internal {
294 /* Area owned by the Linux scsi layer. */
295 uint8_t private[offsetof(struct scsi_cmnd, SCp.Status)];
296 union {
297 STAILQ_ENTRY(ahc_cmd) ste;
298 LIST_ENTRY(ahc_cmd) le;
299 TAILQ_ENTRY(ahc_cmd) tqe;
300 } links;
301 uint32_t end;
302};
303
304struct ahc_cmd {
305 union {
306 struct ahc_cmd_internal icmd;
307 struct scsi_cmnd scsi_cmd;
308 } un;
309};
310
311#define acmd_icmd(cmd) ((cmd)->un.icmd)
312#define acmd_scsi_cmd(cmd) ((cmd)->un.scsi_cmd)
313#define acmd_links un.icmd.links
314
315/*************************** Device Data Structures ***************************/ 271/*************************** Device Data Structures ***************************/
316/* 272/*
317 * A per probed device structure used to deal with some error recovery 273 * A per probed device structure used to deal with some error recovery
@@ -320,7 +276,6 @@ struct ahc_cmd {
320 * after a successfully completed inquiry command to the target when 276 * after a successfully completed inquiry command to the target when
321 * that inquiry data indicates a lun is present. 277 * that inquiry data indicates a lun is present.
322 */ 278 */
323TAILQ_HEAD(ahc_busyq, ahc_cmd);
324typedef enum { 279typedef enum {
325 AHC_DEV_FREEZE_TIL_EMPTY = 0x02, /* Freeze queue until active == 0 */ 280 AHC_DEV_FREEZE_TIL_EMPTY = 0x02, /* Freeze queue until active == 0 */
326 AHC_DEV_Q_BASIC = 0x10, /* Allow basic device queuing */ 281 AHC_DEV_Q_BASIC = 0x10, /* Allow basic device queuing */
@@ -330,8 +285,6 @@ typedef enum {
330 285
331struct ahc_linux_target; 286struct ahc_linux_target;
332struct ahc_linux_device { 287struct ahc_linux_device {
333 TAILQ_ENTRY(ahc_linux_device) links;
334
335 /* 288 /*
336 * The number of transactions currently 289 * The number of transactions currently
337 * queued to the device. 290 * queued to the device.
@@ -401,17 +354,10 @@ struct ahc_linux_device {
401 */ 354 */
402 u_int commands_since_idle_or_otag; 355 u_int commands_since_idle_or_otag;
403#define AHC_OTAG_THRESH 500 356#define AHC_OTAG_THRESH 500
404
405 int lun;
406 struct scsi_device *scsi_device;
407 struct ahc_linux_target *target;
408}; 357};
409 358
410struct ahc_linux_target { 359struct ahc_linux_target {
411 struct ahc_linux_device *devices[AHC_NUM_LUNS]; 360 struct scsi_device *sdev[AHC_NUM_LUNS];
412 int channel;
413 int target;
414 int refcount;
415 struct ahc_transinfo last_tinfo; 361 struct ahc_transinfo last_tinfo;
416 struct ahc_softc *ahc; 362 struct ahc_softc *ahc;
417}; 363};
@@ -445,7 +391,7 @@ struct ahc_platform_data {
445 /* 391 /*
446 * Fields accessed from interrupt context. 392 * Fields accessed from interrupt context.
447 */ 393 */
448 struct ahc_linux_target *targets[AHC_NUM_TARGETS]; 394 struct scsi_target *starget[AHC_NUM_TARGETS];
449 395
450 spinlock_t spin_lock; 396 spinlock_t spin_lock;
451 u_int qfrozen; 397 u_int qfrozen;
@@ -659,7 +605,6 @@ typedef enum
659 605
660/**************************** VL/EISA Routines ********************************/ 606/**************************** VL/EISA Routines ********************************/
661#ifdef CONFIG_EISA 607#ifdef CONFIG_EISA
662extern uint32_t aic7xxx_probe_eisa_vl;
663int ahc_linux_eisa_init(void); 608int ahc_linux_eisa_init(void);
664void ahc_linux_eisa_exit(void); 609void ahc_linux_eisa_exit(void);
665int aic7770_map_registers(struct ahc_softc *ahc, 610int aic7770_map_registers(struct ahc_softc *ahc,
@@ -924,7 +869,6 @@ ahc_notify_xfer_settings_change(struct ahc_softc *ahc,
924static __inline void 869static __inline void
925ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb) 870ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb)
926{ 871{
927 ahc->flags &= ~AHC_RESOURCE_SHORTAGE;
928} 872}
929 873
930int ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg); 874int ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg);