Commit 0371b9a3 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] ide: some CodingStyle fixes from 2.4.x for ide-tape.c

makes 2.4->2.6 diff noticeable smaller
parent 8f7ea5e8
...@@ -764,12 +764,18 @@ typedef struct idetape_packet_command_s { ...@@ -764,12 +764,18 @@ typedef struct idetape_packet_command_s {
/* /*
* Packet command flag bits. * Packet command flag bits.
*/ */
#define PC_ABORT 0 /* Set when an error is considered normal - We won't retry */ /* Set when an error is considered normal - We won't retry */
#define PC_WAIT_FOR_DSC 1 /* 1 When polling for DSC on a media access command */ #define PC_ABORT 0
#define PC_DMA_RECOMMENDED 2 /* 1 when we prefer to use DMA if possible */ /* 1 When polling for DSC on a media access command */
#define PC_DMA_IN_PROGRESS 3 /* 1 while DMA in progress */ #define PC_WAIT_FOR_DSC 1
#define PC_DMA_ERROR 4 /* 1 when encountered problem during DMA */ /* 1 when we prefer to use DMA if possible */
#define PC_WRITING 5 /* Data direction */ #define PC_DMA_RECOMMENDED 2
/* 1 while DMA in progress */
#define PC_DMA_IN_PROGRESS 3
/* 1 when encountered problem during DMA */
#define PC_DMA_ERROR 4
/* Data direction */
#define PC_WRITING 5
/* /*
* Capabilities and Mechanical Status Page * Capabilities and Mechanical Status Page
...@@ -888,12 +894,17 @@ typedef struct { ...@@ -888,12 +894,17 @@ typedef struct {
* required since an additional packet command is needed before the * required since an additional packet command is needed before the
* retry, to get detailed information on what went wrong. * retry, to get detailed information on what went wrong.
*/ */
idetape_pc_t *pc; /* Current packet command */ /* Current packet command */
idetape_pc_t *failed_pc; /* Last failed packet command */ idetape_pc_t *pc;
idetape_pc_t pc_stack[IDETAPE_PC_STACK];/* Packet command stack */ /* Last failed packet command */
int pc_stack_index; /* Next free packet command storage space */ idetape_pc_t *failed_pc;
/* Packet command stack */
idetape_pc_t pc_stack[IDETAPE_PC_STACK];
/* Next free packet command storage space */
int pc_stack_index;
struct request rq_stack[IDETAPE_PC_STACK]; struct request rq_stack[IDETAPE_PC_STACK];
int rq_stack_index; /* We implement a circular array */ /* We implement a circular array */
int rq_stack_index;
/* /*
* DSC polling variables. * DSC polling variables.
...@@ -907,17 +918,23 @@ typedef struct { ...@@ -907,17 +918,23 @@ typedef struct {
* to ide.c only one at a time. * to ide.c only one at a time.
*/ */
struct request *postponed_rq; struct request *postponed_rq;
unsigned long dsc_polling_start; /* The time in which we started polling for DSC */ /* The time in which we started polling for DSC */
struct timer_list dsc_timer; /* Timer used to poll for dsc */ unsigned long dsc_polling_start;
unsigned long best_dsc_rw_frequency; /* Read/Write dsc polling frequency */ /* Timer used to poll for dsc */
unsigned long dsc_polling_frequency; /* The current polling frequency */ struct timer_list dsc_timer;
unsigned long dsc_timeout; /* Maximum waiting time */ /* Read/Write dsc polling frequency */
unsigned long best_dsc_rw_frequency;
/* The current polling frequency */
unsigned long dsc_polling_frequency;
/* Maximum waiting time */
unsigned long dsc_timeout;
/* /*
* Read position information * Read position information
*/ */
u8 partition; u8 partition;
unsigned int first_frame_position; /* Current block */ /* Current block */
unsigned int first_frame_position;
unsigned int last_frame_position; unsigned int last_frame_position;
unsigned int blocks_in_buffer; unsigned int blocks_in_buffer;
...@@ -930,15 +947,19 @@ typedef struct { ...@@ -930,15 +947,19 @@ typedef struct {
* Character device operation * Character device operation
*/ */
unsigned int minor; unsigned int minor;
char name[4]; /* device name */ /* device name */
idetape_chrdev_direction_t chrdev_direction; /* Current character device data transfer direction */ char name[4];
/* Current character device data transfer direction */
idetape_chrdev_direction_t chrdev_direction;
/* /*
* Device information * Device information
*/ */
unsigned short tape_block_size; /* Usually 512 or 1024 bytes */ /* Usually 512 or 1024 bytes */
unsigned short tape_block_size;
int user_bs_factor; int user_bs_factor;
idetape_capabilities_page_t capabilities; /* Copy of the tape's Capabilities and Mechanical Page */ /* Copy of the tape's Capabilities and Mechanical Page */
idetape_capabilities_page_t capabilities;
/* /*
* Active data transfer request parameters. * Active data transfer request parameters.
...@@ -953,8 +974,10 @@ typedef struct { ...@@ -953,8 +974,10 @@ typedef struct {
* The data buffer size is chosen based on the tape's * The data buffer size is chosen based on the tape's
* recommendation. * recommendation.
*/ */
struct request *active_data_request; /* Pointer to the request which is waiting in the device request queue */ /* Pointer to the request which is waiting in the device request queue */
int stage_size; /* Data buffer size (chosen based on the tape's recommendation */ struct request *active_data_request;
/* Data buffer size (chosen based on the tape's recommendation */
int stage_size;
idetape_stage_t *merge_stage; idetape_stage_t *merge_stage;
int merge_stage_size; int merge_stage_size;
struct idetape_bh *bh; struct idetape_bh *bh;
...@@ -967,19 +990,30 @@ typedef struct { ...@@ -967,19 +990,30 @@ typedef struct {
* To accomplish non-pipelined mode, we simply set the following * To accomplish non-pipelined mode, we simply set the following
* variables to zero (or NULL, where appropriate). * variables to zero (or NULL, where appropriate).
*/ */
int nr_stages; /* Number of currently used stages */ /* Number of currently used stages */
int nr_pending_stages; /* Number of pending stages */ int nr_stages;
int max_stages, min_pipeline, max_pipeline; /* We will not allocate more than this number of stages */ /* Number of pending stages */
idetape_stage_t *first_stage; /* The first stage which will be removed from the pipeline */ int nr_pending_stages;
idetape_stage_t *active_stage; /* The currently active stage */ /* We will not allocate more than this number of stages */
idetape_stage_t *next_stage; /* Will be serviced after the currently active request */ int max_stages, min_pipeline, max_pipeline;
idetape_stage_t *last_stage; /* New requests will be added to the pipeline here */ /* The first stage which will be removed from the pipeline */
idetape_stage_t *cache_stage; /* Optional free stage which we can use */ idetape_stage_t *first_stage;
/* The currently active stage */
idetape_stage_t *active_stage;
/* Will be serviced after the currently active request */
idetape_stage_t *next_stage;
/* New requests will be added to the pipeline here */
idetape_stage_t *last_stage;
/* Optional free stage which we can use */
idetape_stage_t *cache_stage;
int pages_per_stage; int pages_per_stage;
int excess_bh_size; /* Wasted space in each stage */ /* Wasted space in each stage */
int excess_bh_size;
unsigned long flags; /* Status/Action flags: long for set_bit */ /* Status/Action flags: long for set_bit */
spinlock_t spinlock; /* protects the ide-tape queue */ unsigned long flags;
/* protects the ide-tape queue */
spinlock_t spinlock;
/* /*
* Measures average tape speed * Measures average tape speed
...@@ -988,31 +1022,44 @@ typedef struct { ...@@ -988,31 +1022,44 @@ typedef struct {
int avg_size; int avg_size;
int avg_speed; int avg_speed;
idetape_request_sense_result_t sense; /* last sense information */ /* last sense information */
idetape_request_sense_result_t sense;
char vendor_id[10]; char vendor_id[10];
char product_id[18]; char product_id[18];
char firmware_revision[6]; char firmware_revision[6];
int firmware_revision_num; int firmware_revision_num;
int door_locked; /* the door is currently locked */ /* the door is currently locked */
int door_locked;
/* /*
* OnStream flags * OnStream flags
*/ */
int onstream; /* the tape is an OnStream tape */ /* the tape is an OnStream tape */
int raw; /* OnStream raw access (32.5KB block size) */ int onstream;
int cur_frames; /* current number of frames in internal buffer */ /* OnStream raw access (32.5KB block size) */
int max_frames; /* max number of frames in internal buffer */ int raw;
int logical_blk_num; /* logical block number */ /* current number of frames in internal buffer */
__u16 wrt_pass_cntr; /* write pass counter */ int cur_frames;
__u32 update_frame_cntr; /* update frame counter */ /* max number of frames in internal buffer */
int max_frames;
/* logical block number */
int logical_blk_num;
/* write pass counter */
__u16 wrt_pass_cntr;
/* update frame counter */
__u32 update_frame_cntr;
struct completion *waiting; struct completion *waiting;
int onstream_write_error; /* write error recovery active */ /* write error recovery active */
int header_ok; /* header frame verified ok */ int onstream_write_error;
int linux_media; /* reading linux-specific media */ /* header frame verified ok */
int header_ok;
/* reading linux-specific media */
int linux_media;
int linux_media_version; int linux_media_version;
char application_sig[5]; /* application signature */ /* application signature */
char application_sig[5];
int filemark_cnt; int filemark_cnt;
int first_mark_addr; int first_mark_addr;
int last_mark_addr; int last_mark_addr;
...@@ -1025,8 +1072,10 @@ typedef struct { ...@@ -1025,8 +1072,10 @@ typedef struct {
* Optimize the number of "buffer filling" * Optimize the number of "buffer filling"
* mode sense commands. * mode sense commands.
*/ */
unsigned long last_buffer_fill; /* last time in which we issued fill cmd */ /* last time in which we issued fill cmd */
int req_buffer_fill; /* buffer fill command requested */ unsigned long last_buffer_fill;
/* buffer fill command requested */
int req_buffer_fill;
int writes_since_buffer_fill; int writes_since_buffer_fill;
int reads_since_buffer_fill; int reads_since_buffer_fill;
...@@ -1035,7 +1084,8 @@ typedef struct { ...@@ -1035,7 +1084,8 @@ typedef struct {
* be postponed, to avoid an infinite postpone * be postponed, to avoid an infinite postpone
* deadlock. * deadlock.
*/ */
int postpone_cnt; /* request postpone count limit */ /* request postpone count limit */
int postpone_cnt;
/* /*
* Measures number of frames: * Measures number of frames:
...@@ -1068,11 +1118,17 @@ typedef struct { ...@@ -1068,11 +1118,17 @@ typedef struct {
* Speed regulation negative feedback loop * Speed regulation negative feedback loop
*/ */
int speed_control; int speed_control;
int pipeline_head_speed, controlled_pipeline_head_speed, uncontrolled_pipeline_head_speed; int pipeline_head_speed;
int controlled_last_pipeline_head, uncontrolled_last_pipeline_head; int controlled_pipeline_head_speed;
unsigned long uncontrolled_pipeline_head_time, controlled_pipeline_head_time; int uncontrolled_pipeline_head_speed;
int controlled_previous_pipeline_head, uncontrolled_previous_pipeline_head; int controlled_last_pipeline_head;
unsigned long controlled_previous_head_time, uncontrolled_previous_head_time; int uncontrolled_last_pipeline_head;
unsigned long uncontrolled_pipeline_head_time;
unsigned long controlled_pipeline_head_time;
int controlled_previous_pipeline_head;
int uncontrolled_previous_pipeline_head;
unsigned long controlled_previous_head_time;
unsigned long uncontrolled_previous_head_time;
int restart_speed_control_req; int restart_speed_control_req;
/* /*
...@@ -1379,23 +1435,40 @@ char *idetape_sense_key_verbose(u8 idetape_sense_key) ...@@ -1379,23 +1435,40 @@ char *idetape_sense_key_verbose(u8 idetape_sense_key)
char *idetape_command_key_verbose(u8 idetape_command_key) char *idetape_command_key_verbose(u8 idetape_command_key)
{ {
switch (idetape_command_key) { switch (idetape_command_key) {
case IDETAPE_TEST_UNIT_READY_CMD: return("TEST_UNIT_READY_CMD"); case IDETAPE_TEST_UNIT_READY_CMD:
case IDETAPE_REWIND_CMD: return("REWIND_CMD"); return("TEST_UNIT_READY_CMD");
case IDETAPE_REQUEST_SENSE_CMD: return("REQUEST_SENSE_CMD"); case IDETAPE_REWIND_CMD:
case IDETAPE_READ_CMD: return("READ_CMD"); return("REWIND_CMD");
case IDETAPE_WRITE_CMD: return("WRITE_CMD"); case IDETAPE_REQUEST_SENSE_CMD:
case IDETAPE_WRITE_FILEMARK_CMD: return("WRITE_FILEMARK_CMD"); return("REQUEST_SENSE_CMD");
case IDETAPE_SPACE_CMD: return("SPACE_CMD"); case IDETAPE_READ_CMD:
case IDETAPE_INQUIRY_CMD: return("INQUIRY_CMD"); return("READ_CMD");
case IDETAPE_ERASE_CMD: return("ERASE_CMD"); case IDETAPE_WRITE_CMD:
case IDETAPE_MODE_SENSE_CMD: return("MODE_SENSE_CMD"); return("WRITE_CMD");
case IDETAPE_MODE_SELECT_CMD: return("MODE_SELECT_CMD"); case IDETAPE_WRITE_FILEMARK_CMD:
case IDETAPE_LOAD_UNLOAD_CMD: return("LOAD_UNLOAD_CMD"); return("WRITE_FILEMARK_CMD");
case IDETAPE_PREVENT_CMD: return("PREVENT_CMD"); case IDETAPE_SPACE_CMD:
case IDETAPE_LOCATE_CMD: return("LOCATE_CMD"); return("SPACE_CMD");
case IDETAPE_READ_POSITION_CMD: return("READ_POSITION_CMD"); case IDETAPE_INQUIRY_CMD:
case IDETAPE_READ_BUFFER_CMD: return("READ_BUFFER_CMD"); return("INQUIRY_CMD");
case IDETAPE_SET_SPEED_CMD: return("SET_SPEED_CMD"); case IDETAPE_ERASE_CMD:
return("ERASE_CMD");
case IDETAPE_MODE_SENSE_CMD:
return("MODE_SENSE_CMD");
case IDETAPE_MODE_SELECT_CMD:
return("MODE_SELECT_CMD");
case IDETAPE_LOAD_UNLOAD_CMD:
return("LOAD_UNLOAD_CMD");
case IDETAPE_PREVENT_CMD:
return("PREVENT_CMD");
case IDETAPE_LOCATE_CMD:
return("LOCATE_CMD");
case IDETAPE_READ_POSITION_CMD:
return("READ_POSITION_CMD");
case IDETAPE_READ_BUFFER_CMD:
return("READ_BUFFER_CMD");
case IDETAPE_SET_SPEED_CMD:
return("SET_SPEED_CMD");
default: { default: {
char buf[20]; char buf[20];
sprintf(buf, "CMD (0x%02x)", idetape_command_key); sprintf(buf, "CMD (0x%02x)", idetape_command_key);
...@@ -1545,7 +1618,7 @@ static struct request *idetape_next_rq_storage (ide_drive_t *drive) ...@@ -1545,7 +1618,7 @@ static struct request *idetape_next_rq_storage (ide_drive_t *drive)
printk(KERN_INFO "ide-tape: rq_stack_index=%d\n", printk(KERN_INFO "ide-tape: rq_stack_index=%d\n",
tape->rq_stack_index); tape->rq_stack_index);
#endif /* IDETAPE_DEBUG_LOG */ #endif /* IDETAPE_DEBUG_LOG */
if (tape->rq_stack_index==IDETAPE_PC_STACK) if (tape->rq_stack_index == IDETAPE_PC_STACK)
tape->rq_stack_index=0; tape->rq_stack_index=0;
return (&tape->rq_stack[tape->rq_stack_index++]); return (&tape->rq_stack[tape->rq_stack_index++]);
} }
...@@ -1879,7 +1952,7 @@ static int idetape_end_request(ide_drive_t *drive, int uptodate, int nr_sects) ...@@ -1879,7 +1952,7 @@ static int idetape_end_request(ide_drive_t *drive, int uptodate, int nr_sects)
(void) ide_do_drive_cmd(drive, tape->active_data_request, ide_end); (void) ide_do_drive_cmd(drive, tape->active_data_request, ide_end);
} else if (!error) { } else if (!error) {
if (!tape->onstream) if (!tape->onstream)
idetape_increase_max_pipeline_stages (drive); idetape_increase_max_pipeline_stages(drive);
} }
} }
ide_end_drive_cmd(drive, 0, 0); ide_end_drive_cmd(drive, 0, 0);
...@@ -2090,21 +2163,25 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive) ...@@ -2090,21 +2163,25 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
if (tape->debug_level >= 1) if (tape->debug_level >= 1)
printk(KERN_INFO "ide-tape: [cmd %x]: check condition\n", pc->c[0]); printk(KERN_INFO "ide-tape: [cmd %x]: check condition\n", pc->c[0]);
#endif #endif
return idetape_retry_pc(drive); /* Retry operation */ /* Retry operation */
return idetape_retry_pc(drive);
} }
pc->error = 0; pc->error = 0;
if (!tape->onstream && if (!tape->onstream &&
test_bit(PC_WAIT_FOR_DSC, &pc->flags) && !status.b.dsc) { test_bit(PC_WAIT_FOR_DSC, &pc->flags) &&
!status.b.dsc) {
/* Media access command */ /* Media access command */
tape->dsc_polling_start = jiffies; tape->dsc_polling_start = jiffies;
tape->dsc_polling_frequency = IDETAPE_DSC_MA_FAST; tape->dsc_polling_frequency = IDETAPE_DSC_MA_FAST;
tape->dsc_timeout = jiffies + IDETAPE_DSC_MA_TIMEOUT; tape->dsc_timeout = jiffies + IDETAPE_DSC_MA_TIMEOUT;
idetape_postpone_request(drive); /* Allow ide.c to handle other requests */ /* Allow ide.c to handle other requests */
idetape_postpone_request(drive);
return ide_stopped; return ide_stopped;
} }
if (tape->failed_pc == pc) if (tape->failed_pc == pc)
tape->failed_pc = NULL; tape->failed_pc = NULL;
return pc->callback(drive); /* Command finished - Call the callback function */ /* Command finished - Call the callback function */
return pc->callback(drive);
} }
if (test_and_clear_bit(PC_DMA_IN_PROGRESS, &pc->flags)) { if (test_and_clear_bit(PC_DMA_IN_PROGRESS, &pc->flags)) {
printk(KERN_ERR "ide-tape: The tape wants to issue more " printk(KERN_ERR "ide-tape: The tape wants to issue more "
...@@ -2123,14 +2200,16 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive) ...@@ -2123,14 +2200,16 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
printk(KERN_ERR "ide-tape: CoD != 0 in idetape_pc_intr\n"); printk(KERN_ERR "ide-tape: CoD != 0 in idetape_pc_intr\n");
return ide_do_reset(drive); return ide_do_reset(drive);
} }
if (ireason.b.io == test_bit(PC_WRITING, &pc->flags)) { /* Hopefully, we will never get here */ if (ireason.b.io == test_bit(PC_WRITING, &pc->flags)) {
/* Hopefully, we will never get here */
printk(KERN_ERR "ide-tape: We wanted to %s, ", printk(KERN_ERR "ide-tape: We wanted to %s, ",
ireason.b.io ? "Write":"Read"); ireason.b.io ? "Write":"Read");
printk(KERN_ERR "ide-tape: but the tape wants us to %s !\n", printk(KERN_ERR "ide-tape: but the tape wants us to %s !\n",
ireason.b.io ? "Read":"Write"); ireason.b.io ? "Read":"Write");
return ide_do_reset(drive); return ide_do_reset(drive);
} }
if (!test_bit(PC_WRITING, &pc->flags)) { /* Reading - Check that we have enough space */ if (!test_bit(PC_WRITING, &pc->flags)) {
/* Reading - Check that we have enough space */
temp = pc->actually_transferred + bcount.all; temp = pc->actually_transferred + bcount.all;
if (temp > pc->request_transfer) { if (temp > pc->request_transfer) {
if (temp > pc->buffer_size) { if (temp > pc->buffer_size) {
...@@ -2149,20 +2228,24 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive) ...@@ -2149,20 +2228,24 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
if (pc->bh != NULL) if (pc->bh != NULL)
idetape_output_buffers(drive, pc, bcount.all); idetape_output_buffers(drive, pc, bcount.all);
else else
HWIF(drive)->atapi_output_bytes(drive, pc->current_position, bcount.all); /* Write the current buffer */ /* Write the current buffer */
HWIF(drive)->atapi_output_bytes(drive, pc->current_position, bcount.all);
} else { } else {
if (pc->bh != NULL) if (pc->bh != NULL)
idetape_input_buffers(drive, pc, bcount.all); idetape_input_buffers(drive, pc, bcount.all);
else else
HWIF(drive)->atapi_input_bytes(drive, pc->current_position, bcount.all); /* Read the current buffer */ /* Read the current buffer */
HWIF(drive)->atapi_input_bytes(drive, pc->current_position, bcount.all);
} }
pc->actually_transferred += bcount.all; /* Update the current position */ /* Update the current position */
pc->actually_transferred += bcount.all;
pc->current_position += bcount.all; pc->current_position += bcount.all;
#if IDETAPE_DEBUG_LOG #if IDETAPE_DEBUG_LOG
if (tape->debug_level >= 2) if (tape->debug_level >= 2)
printk(KERN_INFO "ide-tape: [cmd %x] transferred %d bytes on that interrupt\n", pc->c[0], bcount.all); printk(KERN_INFO "ide-tape: [cmd %x] transferred %d bytes on that interrupt\n", pc->c[0], bcount.all);
#endif #endif
ide_set_handler(drive, &idetape_pc_intr, IDETAPE_WAIT_CMD, NULL); /* And set the interrupt handler again */ /* And set the interrupt handler again */
ide_set_handler(drive, &idetape_pc_intr, IDETAPE_WAIT_CMD, NULL);
return ide_started; return ide_started;
} }
...@@ -2199,9 +2282,9 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive) ...@@ -2199,9 +2282,9 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
* *
* 4. When the packet command is finished, it will be checked for errors. * 4. When the packet command is finished, it will be checked for errors.
* *
* 5. In case an error was found, we queue a request sense packet command * 5. In case an error was found, we queue a request sense packet
* in front of the request queue and retry the operation up to * command in front of the request queue and retry the operation
* IDETAPE_MAX_PC_RETRIES times. * up to IDETAPE_MAX_PC_RETRIES times.
* *
* 6. In case no error was found, or we decided to give up and not * 6. In case no error was found, or we decided to give up and not
* to retry again, the callback function will be called and then * to retry again, the callback function will be called and then
...@@ -2243,7 +2326,8 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive) ...@@ -2243,7 +2326,8 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive)
/* Set the interrupt routine */ /* Set the interrupt routine */
ide_set_handler(drive, &idetape_pc_intr, IDETAPE_WAIT_CMD, NULL); ide_set_handler(drive, &idetape_pc_intr, IDETAPE_WAIT_CMD, NULL);
#ifdef CONFIG_BLK_DEV_IDEDMA #ifdef CONFIG_BLK_DEV_IDEDMA
if (test_bit(PC_DMA_IN_PROGRESS, &pc->flags)) /* Begin DMA, if necessary */ /* Begin DMA, if necessary */
if (test_bit(PC_DMA_IN_PROGRESS, &pc->flags))
(void) (HWIF(drive)->ide_dma_begin(drive)); (void) (HWIF(drive)->ide_dma_begin(drive));
#endif #endif
/* Send the actual packet */ /* Send the actual packet */
...@@ -2268,7 +2352,8 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape ...@@ -2268,7 +2352,8 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape
if (tape->failed_pc == NULL && pc->c[0] != IDETAPE_REQUEST_SENSE_CMD) if (tape->failed_pc == NULL && pc->c[0] != IDETAPE_REQUEST_SENSE_CMD)
tape->failed_pc = pc; tape->failed_pc = pc;
tape->pc = pc; /* Set the current packet command */ /* Set the current packet command */
tape->pc = pc;
if (pc->retries > IDETAPE_MAX_PC_RETRIES || if (pc->retries > IDETAPE_MAX_PC_RETRIES ||
test_bit(PC_ABORT, &pc->flags)) { test_bit(PC_ABORT, &pc->flags)) {
...@@ -2290,10 +2375,12 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape ...@@ -2290,10 +2375,12 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape
if (tape->onstream && if (tape->onstream &&
pc->c[0] == IDETAPE_READ_CMD && pc->c[0] == IDETAPE_READ_CMD &&
tape->sense_key == 3 && tape->sense_key == 3 &&
tape->asc == 0x11) /* AJN-1: 11 should be 0x11 */ tape->asc == 0x11)
/* AJN-1: 11 should be 0x11 */
printk(KERN_ERR "ide-tape: %s: enabling read error recovery\n", tape->name); printk(KERN_ERR "ide-tape: %s: enabling read error recovery\n", tape->name);
} }
pc->error = IDETAPE_ERROR_GENERAL; /* Giving up */ /* Giving up */
pc->error = IDETAPE_ERROR_GENERAL;
} }
tape->failed_pc = NULL; tape->failed_pc = NULL;
return pc->callback(drive); return pc->callback(drive);
...@@ -2304,9 +2391,11 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape ...@@ -2304,9 +2391,11 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape
#endif /* IDETAPE_DEBUG_LOG */ #endif /* IDETAPE_DEBUG_LOG */
pc->retries++; pc->retries++;
pc->actually_transferred = 0; /* We haven't transferred any data yet */ /* We haven't transferred any data yet */
pc->actually_transferred = 0;
pc->current_position = pc->buffer; pc->current_position = pc->buffer;
bcount.all = pc->request_transfer; /* Request to transfer the entire buffer at once */ /* Request to transfer the entire buffer at once */
bcount.all = pc->request_transfer;
if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) { if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) {
printk(KERN_WARNING "ide-tape: DMA disabled, " printk(KERN_WARNING "ide-tape: DMA disabled, "
...@@ -2433,7 +2522,8 @@ static void calculate_speeds(ide_drive_t *drive) ...@@ -2433,7 +2522,8 @@ static void calculate_speeds(ide_drive_t *drive)
else if (time_after(jiffies, tape->controlled_previous_head_time)) else if (time_after(jiffies, tape->controlled_previous_head_time))
tape->controlled_pipeline_head_speed = (tape->pipeline_head - tape->controlled_previous_pipeline_head) * 32 * HZ / (jiffies - tape->controlled_previous_head_time); tape->controlled_pipeline_head_speed = (tape->pipeline_head - tape->controlled_previous_pipeline_head) * 32 * HZ / (jiffies - tape->controlled_previous_head_time);
if (tape->nr_pending_stages < tape->max_stages /*- 1 */) { /* -1 for read mode error recovery */ if (tape->nr_pending_stages < tape->max_stages /*- 1 */) {
/* -1 for read mode error recovery */
if (time_after(jiffies, tape->uncontrolled_previous_head_time + 10 * HZ)) { if (time_after(jiffies, tape->uncontrolled_previous_head_time + 10 * HZ)) {
tape->uncontrolled_pipeline_head_time = jiffies; tape->uncontrolled_pipeline_head_time = jiffies;
tape->uncontrolled_pipeline_head_speed = (tape->pipeline_head - tape->uncontrolled_previous_pipeline_head) * 32 * HZ / (jiffies - tape->uncontrolled_previous_head_time); tape->uncontrolled_pipeline_head_speed = (tape->pipeline_head - tape->uncontrolled_previous_pipeline_head) * 32 * HZ / (jiffies - tape->uncontrolled_previous_head_time);
...@@ -2475,9 +2565,12 @@ static ide_startstop_t idetape_media_access_finished (ide_drive_t *drive) ...@@ -2475,9 +2565,12 @@ static ide_startstop_t idetape_media_access_finished (ide_drive_t *drive)
printk(KERN_INFO "ide-tape: bug: onstream, media_access_finished\n"); printk(KERN_INFO "ide-tape: bug: onstream, media_access_finished\n");
status.all = HWIF(drive)->INB(IDE_STATUS_REG); status.all = HWIF(drive)->INB(IDE_STATUS_REG);
if (status.b.dsc) { if (status.b.dsc) {
if (status.b.check) { /* Error detected */ if (status.b.check) {
/* Error detected */
printk(KERN_ERR "ide-tape: %s: I/O error, ",tape->name); printk(KERN_ERR "ide-tape: %s: I/O error, ",tape->name);
return idetape_retry_pc(drive); /* Retry operation */
/* Retry operation */
return idetape_retry_pc(drive);
} }
pc->error = 0; pc->error = 0;
if (tape->failed_pc == pc) if (tape->failed_pc == pc)
...@@ -2729,7 +2822,8 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive, ...@@ -2729,7 +2822,8 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
tape->name, tape->postpone_cnt); tape->name, tape->postpone_cnt);
#endif #endif
} }
if (!test_and_clear_bit(IDETAPE_IGNORE_DSC, &tape->flags) && !status.b.dsc) { if (!test_and_clear_bit(IDETAPE_IGNORE_DSC, &tape->flags) &&
!status.b.dsc) {
if (postponed_rq == NULL) { if (postponed_rq == NULL) {
tape->dsc_polling_start = jiffies; tape->dsc_polling_start = jiffies;
tape->dsc_polling_frequency = tape->best_dsc_rw_frequency; tape->dsc_polling_frequency = tape->best_dsc_rw_frequency;
...@@ -2992,7 +3086,8 @@ static void idetape_switch_buffers (idetape_tape_t *tape, idetape_stage_t *stage ...@@ -2992,7 +3086,8 @@ static void idetape_switch_buffers (idetape_tape_t *tape, idetape_stage_t *stage
struct idetape_bh *tmp; struct idetape_bh *tmp;
os_aux_t *tmp_aux; os_aux_t *tmp_aux;
tmp = stage->bh; tmp_aux = stage->aux; tmp = stage->bh;
tmp_aux = stage->aux;
stage->bh = tape->merge_stage->bh; stage->bh = tape->merge_stage->bh;
stage->aux = tape->merge_stage->aux; stage->aux = tape->merge_stage->aux;
tape->merge_stage->bh = tmp; tape->merge_stage->bh = tmp;
...@@ -3013,7 +3108,7 @@ static void idetape_add_stage_tail (ide_drive_t *drive,idetape_stage_t *stage) ...@@ -3013,7 +3108,7 @@ static void idetape_add_stage_tail (ide_drive_t *drive,idetape_stage_t *stage)
printk (KERN_INFO "ide-tape: Reached idetape_add_stage_tail\n"); printk (KERN_INFO "ide-tape: Reached idetape_add_stage_tail\n");
#endif /* IDETAPE_DEBUG_LOG */ #endif /* IDETAPE_DEBUG_LOG */
spin_lock_irqsave(&tape->spinlock, flags); spin_lock_irqsave(&tape->spinlock, flags);
stage->next=NULL; stage->next = NULL;
if (tape->last_stage != NULL) if (tape->last_stage != NULL)
tape->last_stage->next=stage; tape->last_stage->next=stage;
else else
...@@ -3079,10 +3174,13 @@ static void idetape_init_stage (ide_drive_t *drive, idetape_stage_t *stage, int ...@@ -3079,10 +3174,13 @@ static void idetape_init_stage (ide_drive_t *drive, idetape_stage_t *stage, int
else else
dat->dat_list[0].flags = OS_DAT_FLAGS_DATA; dat->dat_list[0].flags = OS_DAT_FLAGS_DATA;
dat->dat_list[0].reserved = 0; dat->dat_list[0].reserved = 0;
} }
aux->filemark_cnt = ntohl(tape->filemark_cnt); /* shouldn't this be htonl ?? */ /* shouldn't this be htonl ?? */
aux->phys_fm = ntohl(0xffffffff); /* shouldn't this be htonl ?? */ aux->filemark_cnt = ntohl(tape->filemark_cnt);
aux->last_mark_addr = ntohl(tape->last_mark_addr); /* shouldn't this be htonl ?? */ /* shouldn't this be htonl ?? */
aux->phys_fm = ntohl(0xffffffff);
/* shouldn't this be htonl ?? */
aux->last_mark_addr = ntohl(tape->last_mark_addr);
} }
/* /*
...@@ -3186,8 +3284,8 @@ static void idetape_create_test_unit_ready_cmd(idetape_pc_t *pc) ...@@ -3186,8 +3284,8 @@ static void idetape_create_test_unit_ready_cmd(idetape_pc_t *pc)
* ide_do_drive_cmd from ide.c * ide_do_drive_cmd from ide.c
* cdrom_queue_request and cdrom_queue_packet_command from ide-cd.c * cdrom_queue_request and cdrom_queue_packet_command from ide-cd.c
* *
* We add a special packet command request to the tail of the request queue, * We add a special packet command request to the tail of the request
* and wait for it to be serviced. * queue, and wait for it to be serviced.
* *
* This is not to be called from within the request handling part * This is not to be called from within the request handling part
* of the driver ! We allocate here data in the stack, and it is valid * of the driver ! We allocate here data in the stack, and it is valid
...@@ -3808,7 +3906,8 @@ static int idetape_add_chrdev_write_request (ide_drive_t *drive, int blocks) ...@@ -3808,7 +3906,8 @@ static int idetape_add_chrdev_write_request (ide_drive_t *drive, int blocks)
rq = &new_stage->rq; rq = &new_stage->rq;
ide_init_drive_cmd(rq); ide_init_drive_cmd(rq);
rq->flags = IDETAPE_WRITE_RQ; rq->flags = IDETAPE_WRITE_RQ;
rq->sector = tape->first_frame_position; /* Doesn't actually matter - We always assume sequential access */ /* Doesn't actually matter - We always assume sequential access */
rq->sector = tape->first_frame_position;
rq->nr_sectors = rq->current_nr_sectors = blocks; rq->nr_sectors = rq->current_nr_sectors = blocks;
idetape_switch_buffers(tape, new_stage); idetape_switch_buffers(tape, new_stage);
...@@ -3851,7 +3950,8 @@ static int idetape_add_chrdev_write_request (ide_drive_t *drive, int blocks) ...@@ -3851,7 +3950,8 @@ static int idetape_add_chrdev_write_request (ide_drive_t *drive, int blocks)
idetape_insert_pipeline_into_queue(drive); idetape_insert_pipeline_into_queue(drive);
} }
} }
if (test_and_clear_bit(IDETAPE_PIPELINE_ERROR, &tape->flags)) /* Return a deferred error */ if (test_and_clear_bit(IDETAPE_PIPELINE_ERROR, &tape->flags))
/* Return a deferred error */
return -EIO; return -EIO;
return blocks; return blocks;
} }
...@@ -3971,10 +4071,11 @@ static int idetape_initiate_read (ide_drive_t *drive, int max_stages) ...@@ -3971,10 +4071,11 @@ static int idetape_initiate_read (ide_drive_t *drive, int max_stages)
int bytes_read; int bytes_read;
int blocks = tape->capabilities.ctl; int blocks = tape->capabilities.ctl;
if (tape->chrdev_direction != idetape_direction_read) { /* Initialize read operation */ /* Initialize read operation */
if (tape->chrdev_direction != idetape_direction_read) {
if (tape->chrdev_direction == idetape_direction_write) { if (tape->chrdev_direction == idetape_direction_write) {
idetape_empty_write_pipeline (drive); idetape_empty_write_pipeline(drive);
idetape_flush_tape_buffers (drive); idetape_flush_tape_buffers(drive);
} }
#if IDETAPE_DEBUG_BUGS #if IDETAPE_DEBUG_BUGS
if (tape->merge_stage || tape->merge_stage_size) { if (tape->merge_stage || tape->merge_stage_size) {
...@@ -4058,19 +4159,27 @@ static int idetape_get_logical_blk (ide_drive_t *drive, int logical_blk_num, int ...@@ -4058,19 +4159,27 @@ static int idetape_get_logical_blk (ide_drive_t *drive, int logical_blk_num, int
position = idetape_read_position(drive); position = idetape_read_position(drive);
printk(KERN_INFO "ide-tape: %s: blank block detected at %d\n", tape->name, position); printk(KERN_INFO "ide-tape: %s: blank block detected at %d\n", tape->name, position);
if (position >= 3000 && position < 3080) if (position >= 3000 && position < 3080)
position += 32; /* Why is this check and number ??? MM */ /* Why is this check and number ??? MM */
if (position >= OS_DATA_ENDFRAME1 && position < 3000) position += 32;
if (position >= OS_DATA_ENDFRAME1 &&
position < 3000)
position = 3000; position = 3000;
else else
/* /*
* compensate for write errors that generally skip 80 frames, * compensate for write errors that
* expect around 20 read errors in a row... * generally skip 80 frames, expect
* around 20 read errors in a row...
*/ */
position += 60; position += 60;
if (position >= OS_DATA_ENDFRAME1 && position < 3000) if (position >= OS_DATA_ENDFRAME1 &&
position < 3000)
position = 3000; position = 3000;
printk(KERN_INFO "ide-tape: %s: positioning tape to block %d\n", tape->name, position); printk(KERN_INFO "ide-tape: %s: positioning tape to block %d\n", tape->name, position);
if (position == 3000) /* seems to be needed to correctly position at block 3000 MM */
/* seems to be needed to correctly position
* at block 3000 MM
*/
if (position == 3000)
idetape_position_tape(drive, 0, 0, 0); idetape_position_tape(drive, 0, 0, 0);
idetape_position_tape(drive, position, 0, 0); idetape_position_tape(drive, position, 0, 0);
cnt += 40; cnt += 40;
...@@ -4172,9 +4281,9 @@ static int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks) ...@@ -4172,9 +4281,9 @@ static int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks)
calculate_speeds(drive); calculate_speeds(drive);
} }
#if IDETAPE_DEBUG_BUGS #if IDETAPE_DEBUG_BUGS
if (bytes_read > blocks*tape->tape_block_size) { if (bytes_read > blocks * tape->tape_block_size) {
printk(KERN_ERR "ide-tape: bug: trying to return more bytes than requested\n"); printk(KERN_ERR "ide-tape: bug: trying to return more bytes than requested\n");
bytes_read = blocks*tape->tape_block_size; bytes_read = blocks * tape->tape_block_size;
} }
#endif /* IDETAPE_DEBUG_BUGS */ #endif /* IDETAPE_DEBUG_BUGS */
return (bytes_read); return (bytes_read);
...@@ -4601,7 +4710,8 @@ static ssize_t idetape_chrdev_read (struct file *file, char *buf, ...@@ -4601,7 +4710,8 @@ static ssize_t idetape_chrdev_read (struct file *file, char *buf,
if (tape->chrdev_direction != idetape_direction_read) { if (tape->chrdev_direction != idetape_direction_read) {
if (test_bit(IDETAPE_DETECT_BS, &tape->flags)) if (test_bit(IDETAPE_DETECT_BS, &tape->flags))
if (count > tape->tape_block_size && (count % tape->tape_block_size) == 0) if (count > tape->tape_block_size &&
(count % tape->tape_block_size) == 0)
tape->user_bs_factor = count / tape->tape_block_size; tape->user_bs_factor = count / tape->tape_block_size;
} }
if ((rc = idetape_initiate_read(drive, tape->max_stages)) < 0) if ((rc = idetape_initiate_read(drive, tape->max_stages)) < 0)
...@@ -4835,8 +4945,8 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf, ...@@ -4835,8 +4945,8 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf,
return -EINVAL; return -EINVAL;
} }
/* /*
* Check if we reach the end of the tape. Just assume the * Check if we reach the end of the tape. Just assume the whole
* whole pipeline is filled with write requests! * pipeline is filled with write requests!
*/ */
if (tape->first_frame_position + tape->nr_stages >= tape->capacity - OS_EW) { if (tape->first_frame_position + tape->nr_stages >= tape->capacity - OS_EW) {
#if ONSTREAM_DEBUG #if ONSTREAM_DEBUG
...@@ -4849,8 +4959,8 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf, ...@@ -4849,8 +4959,8 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf,
} }
} }
/* Initialize write operation */
if (tape->chrdev_direction != idetape_direction_write) { if (tape->chrdev_direction != idetape_direction_write) {
/* Initialize write operation */
if (tape->chrdev_direction == idetape_direction_read) if (tape->chrdev_direction == idetape_direction_read)
idetape_discard_read_pipeline(drive, 1); idetape_discard_read_pipeline(drive, 1);
#if IDETAPE_DEBUG_BUGS #if IDETAPE_DEBUG_BUGS
...@@ -4937,7 +5047,7 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf, ...@@ -4937,7 +5047,7 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf,
tape->merge_stage_size = 0; tape->merge_stage_size = 0;
retval = idetape_add_chrdev_write_request(drive, tape->capabilities.ctl); retval = idetape_add_chrdev_write_request(drive, tape->capabilities.ctl);
if (retval <= 0) if (retval <= 0)
return(retval); return (retval);
} }
} }
while (count >= tape->stage_size) { while (count >= tape->stage_size) {
...@@ -4947,7 +5057,7 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf, ...@@ -4947,7 +5057,7 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf,
retval = idetape_add_chrdev_write_request(drive, tape->capabilities.ctl); retval = idetape_add_chrdev_write_request(drive, tape->capabilities.ctl);
actually_written += tape->stage_size; actually_written += tape->stage_size;
if (retval <= 0) if (retval <= 0)
return(retval); return (retval);
} }
if (count) { if (count) {
actually_written += count; actually_written += count;
...@@ -4964,7 +5074,8 @@ static int idetape_write_filemark (ide_drive_t *drive) ...@@ -4964,7 +5074,8 @@ static int idetape_write_filemark (ide_drive_t *drive)
idetape_pc_t pc; idetape_pc_t pc;
if (!tape->onstream) { if (!tape->onstream) {
idetape_create_write_filemark_cmd(drive, &pc, 1); /* Write a filemark */ /* Write a filemark */
idetape_create_write_filemark_cmd(drive, &pc, 1);
if (idetape_queue_pc_tail(drive, &pc)) { if (idetape_queue_pc_tail(drive, &pc)) {
printk(KERN_ERR "ide-tape: Couldn't write a filemark\n"); printk(KERN_ERR "ide-tape: Couldn't write a filemark\n");
return -EIO; return -EIO;
...@@ -5894,17 +6005,19 @@ static void idetape_get_mode_sense_results (ide_drive_t *drive) ...@@ -5894,17 +6005,19 @@ static void idetape_get_mode_sense_results (ide_drive_t *drive)
idetape_create_mode_sense_cmd(&pc, IDETAPE_CAPABILITIES_PAGE); idetape_create_mode_sense_cmd(&pc, IDETAPE_CAPABILITIES_PAGE);
if (idetape_queue_pc_tail(drive, &pc)) { if (idetape_queue_pc_tail(drive, &pc)) {
printk(KERN_ERR "ide-tape: Can't get tape parameters - assuming some default values\n"); printk(KERN_ERR "ide-tape: Can't get tape parameters - assuming some default values\n");
tape->tape_block_size = 512; tape->capabilities.ctl = 52; tape->tape_block_size = 512;
tape->capabilities.speed = 450; tape->capabilities.buffer_size = 6 * 52; tape->capabilities.ctl = 52;
tape->capabilities.speed = 450;
tape->capabilities.buffer_size = 6 * 52;
return; return;
} }
header = (idetape_mode_parameter_header_t *) pc.buffer; header = (idetape_mode_parameter_header_t *) pc.buffer;
capabilities = (idetape_capabilities_page_t *) (pc.buffer + sizeof(idetape_mode_parameter_header_t) + header->bdl); capabilities = (idetape_capabilities_page_t *) (pc.buffer + sizeof(idetape_mode_parameter_header_t) + header->bdl);
capabilities->max_speed = ntohs (capabilities->max_speed); capabilities->max_speed = ntohs(capabilities->max_speed);
capabilities->ctl = ntohs (capabilities->ctl); capabilities->ctl = ntohs(capabilities->ctl);
capabilities->speed = ntohs (capabilities->speed); capabilities->speed = ntohs(capabilities->speed);
capabilities->buffer_size = ntohs (capabilities->buffer_size); capabilities->buffer_size = ntohs(capabilities->buffer_size);
if (!capabilities->speed) { if (!capabilities->speed) {
printk(KERN_INFO "ide-tape: %s: overriding capabilities->speed (assuming 650KB/sec)\n", drive->name); printk(KERN_INFO "ide-tape: %s: overriding capabilities->speed (assuming 650KB/sec)\n", drive->name);
...@@ -6040,7 +6153,8 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor) ...@@ -6040,7 +6153,8 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor)
memset(tape, 0, sizeof (idetape_tape_t)); memset(tape, 0, sizeof (idetape_tape_t));
spin_lock_init(&tape->spinlock); spin_lock_init(&tape->spinlock);
drive->driver_data = tape; drive->driver_data = tape;
drive->ready_stat = 0; /* An ATAPI device ignores DRDY */ /* An ATAPI device ignores DRDY */
drive->ready_stat = 0;
if (strstr(drive->id->model, "OnStream DI-")) if (strstr(drive->id->model, "OnStream DI-"))
tape->onstream = 1; tape->onstream = 1;
drive->dsc_overlap = 1; drive->dsc_overlap = 1;
...@@ -6059,7 +6173,9 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor) ...@@ -6059,7 +6173,9 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor)
#endif /* CONFIG_BLK_DEV_IDEPCI */ #endif /* CONFIG_BLK_DEV_IDEPCI */
tape->drive = drive; tape->drive = drive;
tape->minor = minor; tape->minor = minor;
tape->name[0] = 'h'; tape->name[1] = 't'; tape->name[2] = '0' + minor; tape->name[0] = 'h';
tape->name[1] = 't';
tape->name[2] = '0' + minor;
tape->chrdev_direction = idetape_direction_none; tape->chrdev_direction = idetape_direction_none;
tape->pc = tape->pc_stack; tape->pc = tape->pc_stack;
tape->max_insert_speed = 10000; tape->max_insert_speed = 10000;
...@@ -6146,7 +6262,7 @@ static int idetape_cleanup (ide_drive_t *drive) ...@@ -6146,7 +6262,7 @@ static int idetape_cleanup (ide_drive_t *drive)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&ide_lock, flags); spin_lock_irqsave(&ide_lock, flags);
if (test_bit (IDETAPE_BUSY, &tape->flags) || drive->usage || if (test_bit(IDETAPE_BUSY, &tape->flags) || drive->usage ||
tape->first_stage != NULL || tape->merge_stage_size) { tape->first_stage != NULL || tape->merge_stage_size) {
spin_unlock_irqrestore(&ide_lock, flags); spin_unlock_irqrestore(&ide_lock, flags);
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment