Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
ide-io.c File Reference
#include <linux/module.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/timer.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/major.h>
#include <linux/errno.h>
#include <linux/genhd.h>
#include <linux/blkpg.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/ide.h>
#include <linux/completion.h>
#include <linux/reboot.h>
#include <linux/cdrom.h>
#include <linux/seq_file.h>
#include <linux/device.h>
#include <linux/kmod.h>
#include <linux/scatterlist.h>
#include <linux/bitops.h>
#include <asm/byteorder.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/io.h>

Go to the source code of this file.

Functions

int ide_end_rq (ide_drive_t *drive, struct request *rq, int error, unsigned int nr_bytes)
 
 EXPORT_SYMBOL_GPL (ide_end_rq)
 
void ide_complete_cmd (ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err)
 
int ide_complete_rq (ide_drive_t *drive, int error, unsigned int nr_bytes)
 
 EXPORT_SYMBOL (ide_complete_rq)
 
void ide_kill_rq (ide_drive_t *drive, struct request *rq)
 
void ide_map_sg (ide_drive_t *drive, struct ide_cmd *cmd)
 
 EXPORT_SYMBOL_GPL (ide_map_sg)
 
void ide_init_sg_cmd (struct ide_cmd *cmd, unsigned int nr_bytes)
 
 EXPORT_SYMBOL_GPL (ide_init_sg_cmd)
 
void ide_stall_queue (ide_drive_t *drive, unsigned long timeout)
 
 EXPORT_SYMBOL (ide_stall_queue)
 
void ide_requeue_and_plug (ide_drive_t *drive, struct request *rq)
 
void do_ide_request (struct request_queue *q)
 
void ide_timer_expiry (unsigned long data)
 
irqreturn_t ide_intr (int irq, void *dev_id)
 
 EXPORT_SYMBOL_GPL (ide_intr)
 
void ide_pad_transfer (ide_drive_t *drive, int write, int len)
 
 EXPORT_SYMBOL_GPL (ide_pad_transfer)
 

Function Documentation

void do_ide_request ( struct request_queue q)

Definition at line 456 of file ide-io.c.

EXPORT_SYMBOL ( ide_complete_rq  )
EXPORT_SYMBOL ( ide_stall_queue  )
EXPORT_SYMBOL_GPL ( ide_end_rq  )
EXPORT_SYMBOL_GPL ( ide_map_sg  )
EXPORT_SYMBOL_GPL ( ide_init_sg_cmd  )
EXPORT_SYMBOL_GPL ( ide_intr  )
EXPORT_SYMBOL_GPL ( ide_pad_transfer  )
void ide_complete_cmd ( ide_drive_t drive,
struct ide_cmd cmd,
u8  stat,
u8  err 
)

Definition at line 74 of file ide-io.c.

int ide_complete_rq ( ide_drive_t drive,
int  error,
unsigned int  nr_bytes 
)

Definition at line 115 of file ide-io.c.

int ide_end_rq ( ide_drive_t drive,
struct request rq,
int  error,
unsigned int  nr_bytes 
)

Definition at line 57 of file ide-io.c.

void ide_init_sg_cmd ( struct ide_cmd cmd,
unsigned int  nr_bytes 
)

Definition at line 233 of file ide-io.c.

irqreturn_t ide_intr ( int  irq,
void dev_id 
)

ide_intr - default IDE interrupt handler : interrupt number : hwif : unused weirdness from the kernel irq layer

This is the default IRQ handler for the IDE layer. You should not need to override it. If you do be aware it is subtle in places

hwif is the interface in the group currently performing a command. hwif->cur_dev is the drive and hwif->handler is the IRQ handler to call. As we issue a command the handlers step through multiple states, reassigning the handler to the next step in the process. Unlike a smart SCSI controller IDE expects the main processor to sequence the various transfer stages. We also manage a poll timer to catch up with most timeout situations. There are still a few where the handlers don't ever decide to give up.

The handler eventually returns ide_stopped to indicate the request completed. At this point we issue the next request on the port and the process begins again.

Definition at line 770 of file ide-io.c.

void ide_kill_rq ( ide_drive_t drive,
struct request rq 
)

Definition at line 136 of file ide-io.c.

void ide_map_sg ( ide_drive_t drive,
struct ide_cmd cmd 
)

Definition at line 223 of file ide-io.c.

void ide_pad_transfer ( ide_drive_t drive,
int  write,
int  len 
)

Definition at line 879 of file ide-io.c.

void ide_requeue_and_plug ( ide_drive_t drive,
struct request rq 
)

Definition at line 443 of file ide-io.c.

void ide_stall_queue ( ide_drive_t drive,
unsigned long  timeout 
)

ide_stall_queue - pause an IDE device : drive to stall : time to stall for (jiffies)

ide_stall_queue() can be used by a drive to give excess bandwidth back to the port by sleeping for timeout jiffies.

Definition at line 386 of file ide-io.c.

void ide_timer_expiry ( unsigned long  data)

ide_timer_expiry - handle lack of an IDE interrupt : timer callback magic (hwif)

An IDE command has timed out before the expected drive return occurred. At this point we attempt to clean up the current mess. If the current handler includes an expiry handler then we invoke the expiry handler, and providing it is happy the work is done. If that fails we apply generic recovery rules invoking the handler and checking the drive DMA status. We have an excessively incestuous relationship with the DMA logic that wants cleaning up.

Definition at line 613 of file ide-io.c.