#include <linux/init.h>
#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
#include "NCR53C9x.h"
#include <asm/system.h>
};
/* The master ring of all esp hosts we are managing in this driver. */
-struct NCR_ESP *espchain = 0;
+struct NCR_ESP *espchain;
int nesps = 0, esps_in_use = 0, esps_running = 0;
irqreturn_t esp_intr(int irq, void *dev_id, struct pt_regs *pregs);
/* Debugging routines */
-struct esp_cmdstrings {
+static struct esp_cmdstrings {
unchar cmdchar;
char *text;
} esp_cmd_strings[] = {
#endif
#ifdef DEBUG_ESP_CMDS
-inline void esp_cmd(struct NCR_ESP *esp, struct ESP_regs *eregs,
+static inline void esp_cmd(struct NCR_ESP *esp, struct ESP_regs *eregs,
unchar cmd)
{
esp->espcmdlog[esp->espcmdent] = cmd;
} else {
espchain = esp;
}
- esp->next = 0;
+ esp->next = NULL;
return esp;
}
struct NCR_ESP *elink;
if(espchain == esp) {
- espchain = 0;
+ espchain = NULL;
} else {
for(elink = espchain; elink && (elink->next != esp); elink = elink->next);
if(elink)
}
/* Initialize the command queues */
- esp->current_SC = 0;
- esp->disconnected_SC = 0;
- esp->issue_SC = 0;
+ esp->current_SC = NULL;
+ esp->disconnected_SC = NULL;
+ esp->issue_SC = NULL;
/* Clear the state machines. */
esp->targets_present = 0;
return 0;
}
-/* Only queuing supported in this ESP driver. */
-int esp_command(Scsi_Cmnd *SCpnt)
-{
-#ifdef DEBUG_ESP
- struct NCR_ESP *esp = (struct NCR_ESP *) SCpnt->device->host->hostdata;
-#endif
-
- ESPLOG(("esp%d: esp_command() called...\n", esp->esp_id));
- return -1;
-}
-
/* Dump driver state. */
static void esp_dump_cmd(Scsi_Cmnd *SCptr)
{
ESPLOG(("esp%d: Weird, being reselected but disconnected "
"command queue is empty.\n", esp->esp_id));
esp->snip = 0;
- esp->current_SC = 0;
+ esp->current_SC = NULL;
sp->SCp.phase = not_issued;
append_SC(&esp->issue_SC, sp);
}
}
static espfunc_t isvc_vector[] = {
- 0,
+ NULL,
esp_do_phase_determine,
esp_do_resetbus,
esp_finish_reset,
}
#endif
+EXPORT_SYMBOL(esp_abort);
+EXPORT_SYMBOL(esp_allocate);
+EXPORT_SYMBOL(esp_deallocate);
+EXPORT_SYMBOL(esp_initialize);
+EXPORT_SYMBOL(esp_intr);
+EXPORT_SYMBOL(esp_queue);
+EXPORT_SYMBOL(esp_reset);
+EXPORT_SYMBOL(esp_slave_alloc);
+EXPORT_SYMBOL(esp_slave_destroy);
+EXPORT_SYMBOL(esps_in_use);
+
MODULE_LICENSE("GPL");