aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-04-02 04:28:46 -0400
committerJeff Garzik <jeff@garzik.org>2008-04-04 02:43:35 -0400
commit436d34b36202ef724778ded1e9cb10f8c37b32bc (patch)
tree45671994cf049263a25e7f540ae488b97bb7d01f /drivers/ata
parenta4ba7fe2a6c2b61419b290035bff398ab2591c54 (diff)
libata: uninline atapi_cmd_type()
Uninline atapi_cmd_type(). It doesn't really have to be inline and more case will be added which need to access unexported libata variable. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-core.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 2db5c9c9ca10..e9b69ba489d2 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -326,6 +326,39 @@ static void ata_force_horkage(struct ata_device *dev)
326} 326}
327 327
328/** 328/**
329 * atapi_cmd_type - Determine ATAPI command type from SCSI opcode
330 * @opcode: SCSI opcode
331 *
332 * Determine ATAPI command type from @opcode.
333 *
334 * LOCKING:
335 * None.
336 *
337 * RETURNS:
338 * ATAPI_{READ|WRITE|READ_CD|PASS_THRU|MISC}
339 */
340int atapi_cmd_type(u8 opcode)
341{
342 switch (opcode) {
343 case GPCMD_READ_10:
344 case GPCMD_READ_12:
345 return ATAPI_READ;
346
347 case GPCMD_WRITE_10:
348 case GPCMD_WRITE_12:
349 case GPCMD_WRITE_AND_VERIFY_10:
350 return ATAPI_WRITE;
351
352 case GPCMD_READ_CD:
353 case GPCMD_READ_CD_MSF:
354 return ATAPI_READ_CD;
355
356 default:
357 return ATAPI_MISC;
358 }
359}
360
361/**
329 * ata_tf_to_fis - Convert ATA taskfile to SATA FIS structure 362 * ata_tf_to_fis - Convert ATA taskfile to SATA FIS structure
330 * @tf: Taskfile to convert 363 * @tf: Taskfile to convert
331 * @pmp: Port multiplier port 364 * @pmp: Port multiplier port
@@ -7774,6 +7807,7 @@ EXPORT_SYMBOL_GPL(ata_tf_read);
7774EXPORT_SYMBOL_GPL(ata_noop_dev_select); 7807EXPORT_SYMBOL_GPL(ata_noop_dev_select);
7775EXPORT_SYMBOL_GPL(ata_std_dev_select); 7808EXPORT_SYMBOL_GPL(ata_std_dev_select);
7776EXPORT_SYMBOL_GPL(sata_print_link_status); 7809EXPORT_SYMBOL_GPL(sata_print_link_status);
7810EXPORT_SYMBOL_GPL(atapi_cmd_type);
7777EXPORT_SYMBOL_GPL(ata_tf_to_fis); 7811EXPORT_SYMBOL_GPL(ata_tf_to_fis);
7778EXPORT_SYMBOL_GPL(ata_tf_from_fis); 7812EXPORT_SYMBOL_GPL(ata_tf_from_fis);
7779EXPORT_SYMBOL_GPL(ata_pack_xfermask); 7813EXPORT_SYMBOL_GPL(ata_pack_xfermask);