11da177e4SLinus Torvalds /* 21da177e4SLinus Torvalds * Copyright (c) 2000-2001 Adaptec Inc. 31da177e4SLinus Torvalds * All rights reserved. 41da177e4SLinus Torvalds * 51da177e4SLinus Torvalds * Redistribution and use in source and binary forms, with or without 61da177e4SLinus Torvalds * modification, are permitted provided that the following conditions 71da177e4SLinus Torvalds * are met: 81da177e4SLinus Torvalds * 1. Redistributions of source code must retain the above copyright 91da177e4SLinus Torvalds * notice, this list of conditions, and the following disclaimer, 101da177e4SLinus Torvalds * without modification. 111da177e4SLinus Torvalds * 2. Redistributions in binary form must reproduce at minimum a disclaimer 121da177e4SLinus Torvalds * substantially similar to the "NO WARRANTY" disclaimer below 131da177e4SLinus Torvalds * ("Disclaimer") and any redistribution must be conditioned upon 141da177e4SLinus Torvalds * including a substantially similar Disclaimer requirement for further 151da177e4SLinus Torvalds * binary redistribution. 161da177e4SLinus Torvalds * 3. Neither the names of the above-listed copyright holders nor the names 171da177e4SLinus Torvalds * of any contributors may be used to endorse or promote products derived 181da177e4SLinus Torvalds * from this software without specific prior written permission. 191da177e4SLinus Torvalds * 201da177e4SLinus Torvalds * Alternatively, this software may be distributed under the terms of the 211da177e4SLinus Torvalds * GNU General Public License ("GPL") version 2 as published by the Free 221da177e4SLinus Torvalds * Software Foundation. 231da177e4SLinus Torvalds * 241da177e4SLinus Torvalds * NO WARRANTY 251da177e4SLinus Torvalds * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 261da177e4SLinus Torvalds * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 271da177e4SLinus Torvalds * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 281da177e4SLinus Torvalds * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 291da177e4SLinus Torvalds * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 301da177e4SLinus Torvalds * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 311da177e4SLinus Torvalds * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 321da177e4SLinus Torvalds * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 331da177e4SLinus Torvalds * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 341da177e4SLinus Torvalds * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 351da177e4SLinus Torvalds * POSSIBILITY OF SUCH DAMAGES. 361da177e4SLinus Torvalds * 371da177e4SLinus Torvalds * String handling code courtesy of Gerard Roudier's <groudier@club-internet.fr> 381da177e4SLinus Torvalds * sym driver. 391da177e4SLinus Torvalds * 401da177e4SLinus Torvalds * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_proc.c#19 $ 411da177e4SLinus Torvalds */ 421da177e4SLinus Torvalds #include "aic79xx_osm.h" 431da177e4SLinus Torvalds #include "aic79xx_inline.h" 441da177e4SLinus Torvalds 451da177e4SLinus Torvalds static void copy_mem_info(struct info_str *info, char *data, int len); 461da177e4SLinus Torvalds static int copy_info(struct info_str *info, char *fmt, ...); 471da177e4SLinus Torvalds static void ahd_dump_target_state(struct ahd_softc *ahd, 481da177e4SLinus Torvalds struct info_str *info, 491da177e4SLinus Torvalds u_int our_id, char channel, 501da177e4SLinus Torvalds u_int target_id, u_int target_offset); 511da177e4SLinus Torvalds static void ahd_dump_device_state(struct info_str *info, 521da177e4SLinus Torvalds struct ahd_linux_device *dev); 531da177e4SLinus Torvalds static int ahd_proc_write_seeprom(struct ahd_softc *ahd, 541da177e4SLinus Torvalds char *buffer, int length); 551da177e4SLinus Torvalds 561da177e4SLinus Torvalds static void 571da177e4SLinus Torvalds copy_mem_info(struct info_str *info, char *data, int len) 581da177e4SLinus Torvalds { 591da177e4SLinus Torvalds if (info->pos + len > info->offset + info->length) 601da177e4SLinus Torvalds len = info->offset + info->length - info->pos; 611da177e4SLinus Torvalds 621da177e4SLinus Torvalds if (info->pos + len < info->offset) { 631da177e4SLinus Torvalds info->pos += len; 641da177e4SLinus Torvalds return; 651da177e4SLinus Torvalds } 661da177e4SLinus Torvalds 671da177e4SLinus Torvalds if (info->pos < info->offset) { 681da177e4SLinus Torvalds off_t partial; 691da177e4SLinus Torvalds 701da177e4SLinus Torvalds partial = info->offset - info->pos; 711da177e4SLinus Torvalds data += partial; 721da177e4SLinus Torvalds info->pos += partial; 731da177e4SLinus Torvalds len -= partial; 741da177e4SLinus Torvalds } 751da177e4SLinus Torvalds 761da177e4SLinus Torvalds if (len > 0) { 771da177e4SLinus Torvalds memcpy(info->buffer, data, len); 781da177e4SLinus Torvalds info->pos += len; 791da177e4SLinus Torvalds info->buffer += len; 801da177e4SLinus Torvalds } 811da177e4SLinus Torvalds } 821da177e4SLinus Torvalds 831da177e4SLinus Torvalds static int 841da177e4SLinus Torvalds copy_info(struct info_str *info, char *fmt, ...) 851da177e4SLinus Torvalds { 861da177e4SLinus Torvalds va_list args; 871da177e4SLinus Torvalds char buf[256]; 881da177e4SLinus Torvalds int len; 891da177e4SLinus Torvalds 901da177e4SLinus Torvalds va_start(args, fmt); 911da177e4SLinus Torvalds len = vsprintf(buf, fmt, args); 921da177e4SLinus Torvalds va_end(args); 931da177e4SLinus Torvalds 941da177e4SLinus Torvalds copy_mem_info(info, buf, len); 951da177e4SLinus Torvalds return (len); 961da177e4SLinus Torvalds } 971da177e4SLinus Torvalds 981da177e4SLinus Torvalds void 991da177e4SLinus Torvalds ahd_format_transinfo(struct info_str *info, struct ahd_transinfo *tinfo) 1001da177e4SLinus Torvalds { 1011da177e4SLinus Torvalds u_int speed; 1021da177e4SLinus Torvalds u_int freq; 1031da177e4SLinus Torvalds u_int mb; 1041da177e4SLinus Torvalds 1051da177e4SLinus Torvalds if (tinfo->period == AHD_PERIOD_UNKNOWN) { 1061da177e4SLinus Torvalds copy_info(info, "Renegotiation Pending\n"); 1071da177e4SLinus Torvalds return; 1081da177e4SLinus Torvalds } 1091da177e4SLinus Torvalds speed = 3300; 1101da177e4SLinus Torvalds freq = 0; 1111da177e4SLinus Torvalds if (tinfo->offset != 0) { 1121da177e4SLinus Torvalds freq = aic_calc_syncsrate(tinfo->period); 1131da177e4SLinus Torvalds speed = freq; 1141da177e4SLinus Torvalds } 1151da177e4SLinus Torvalds speed *= (0x01 << tinfo->width); 1161da177e4SLinus Torvalds mb = speed / 1000; 1171da177e4SLinus Torvalds if (mb > 0) 1181da177e4SLinus Torvalds copy_info(info, "%d.%03dMB/s transfers", mb, speed % 1000); 1191da177e4SLinus Torvalds else 1201da177e4SLinus Torvalds copy_info(info, "%dKB/s transfers", speed); 1211da177e4SLinus Torvalds 1221da177e4SLinus Torvalds if (freq != 0) { 1231da177e4SLinus Torvalds int printed_options; 1241da177e4SLinus Torvalds 1251da177e4SLinus Torvalds printed_options = 0; 1261da177e4SLinus Torvalds copy_info(info, " (%d.%03dMHz", freq / 1000, freq % 1000); 1271da177e4SLinus Torvalds if ((tinfo->ppr_options & MSG_EXT_PPR_RD_STRM) != 0) { 1281da177e4SLinus Torvalds copy_info(info, " RDSTRM"); 1291da177e4SLinus Torvalds printed_options++; 1301da177e4SLinus Torvalds } 1311da177e4SLinus Torvalds if ((tinfo->ppr_options & MSG_EXT_PPR_DT_REQ) != 0) { 1321da177e4SLinus Torvalds copy_info(info, "%s", printed_options ? "|DT" : " DT"); 1331da177e4SLinus Torvalds printed_options++; 1341da177e4SLinus Torvalds } 1351da177e4SLinus Torvalds if ((tinfo->ppr_options & MSG_EXT_PPR_IU_REQ) != 0) { 1361da177e4SLinus Torvalds copy_info(info, "%s", printed_options ? "|IU" : " IU"); 1371da177e4SLinus Torvalds printed_options++; 1381da177e4SLinus Torvalds } 1391da177e4SLinus Torvalds if ((tinfo->ppr_options & MSG_EXT_PPR_RTI) != 0) { 1401da177e4SLinus Torvalds copy_info(info, "%s", 1411da177e4SLinus Torvalds printed_options ? "|RTI" : " RTI"); 1421da177e4SLinus Torvalds printed_options++; 1431da177e4SLinus Torvalds } 1441da177e4SLinus Torvalds if ((tinfo->ppr_options & MSG_EXT_PPR_QAS_REQ) != 0) { 1451da177e4SLinus Torvalds copy_info(info, "%s", 1461da177e4SLinus Torvalds printed_options ? "|QAS" : " QAS"); 1471da177e4SLinus Torvalds printed_options++; 1481da177e4SLinus Torvalds } 1491da177e4SLinus Torvalds } 1501da177e4SLinus Torvalds 1511da177e4SLinus Torvalds if (tinfo->width > 0) { 1521da177e4SLinus Torvalds if (freq != 0) { 1531da177e4SLinus Torvalds copy_info(info, ", "); 1541da177e4SLinus Torvalds } else { 1551da177e4SLinus Torvalds copy_info(info, " ("); 1561da177e4SLinus Torvalds } 1571da177e4SLinus Torvalds copy_info(info, "%dbit)", 8 * (0x01 << tinfo->width)); 1581da177e4SLinus Torvalds } else if (freq != 0) { 1591da177e4SLinus Torvalds copy_info(info, ")"); 1601da177e4SLinus Torvalds } 1611da177e4SLinus Torvalds copy_info(info, "\n"); 1621da177e4SLinus Torvalds } 1631da177e4SLinus Torvalds 1641da177e4SLinus Torvalds static void 1651da177e4SLinus Torvalds ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info, 1661da177e4SLinus Torvalds u_int our_id, char channel, u_int target_id, 1671da177e4SLinus Torvalds u_int target_offset) 1681da177e4SLinus Torvalds { 1691da177e4SLinus Torvalds struct ahd_linux_target *targ; 1701da177e4SLinus Torvalds struct ahd_initiator_tinfo *tinfo; 1711da177e4SLinus Torvalds struct ahd_tmode_tstate *tstate; 1721da177e4SLinus Torvalds int lun; 1731da177e4SLinus Torvalds 1741da177e4SLinus Torvalds tinfo = ahd_fetch_transinfo(ahd, channel, our_id, 1751da177e4SLinus Torvalds target_id, &tstate); 1761da177e4SLinus Torvalds copy_info(info, "Target %d Negotiation Settings\n", target_id); 1771da177e4SLinus Torvalds copy_info(info, "\tUser: "); 1781da177e4SLinus Torvalds ahd_format_transinfo(info, &tinfo->user); 1791da177e4SLinus Torvalds targ = ahd->platform_data->targets[target_offset]; 1801da177e4SLinus Torvalds if (targ == NULL) 1811da177e4SLinus Torvalds return; 1821da177e4SLinus Torvalds 1831da177e4SLinus Torvalds copy_info(info, "\tGoal: "); 1841da177e4SLinus Torvalds ahd_format_transinfo(info, &tinfo->goal); 1851da177e4SLinus Torvalds copy_info(info, "\tCurr: "); 1861da177e4SLinus Torvalds ahd_format_transinfo(info, &tinfo->curr); 1871da177e4SLinus Torvalds copy_info(info, "\tTransmission Errors %ld\n", targ->errors_detected); 1881da177e4SLinus Torvalds 1891da177e4SLinus Torvalds for (lun = 0; lun < AHD_NUM_LUNS; lun++) { 1901da177e4SLinus Torvalds struct ahd_linux_device *dev; 1911da177e4SLinus Torvalds 1921da177e4SLinus Torvalds dev = targ->devices[lun]; 1931da177e4SLinus Torvalds 1941da177e4SLinus Torvalds if (dev == NULL) 1951da177e4SLinus Torvalds continue; 1961da177e4SLinus Torvalds 1971da177e4SLinus Torvalds ahd_dump_device_state(info, dev); 1981da177e4SLinus Torvalds } 1991da177e4SLinus Torvalds } 2001da177e4SLinus Torvalds 2011da177e4SLinus Torvalds static void 2021da177e4SLinus Torvalds ahd_dump_device_state(struct info_str *info, struct ahd_linux_device *dev) 2031da177e4SLinus Torvalds { 2041da177e4SLinus Torvalds copy_info(info, "\tChannel %c Target %d Lun %d Settings\n", 2051da177e4SLinus Torvalds dev->target->channel + 'A', dev->target->target, dev->lun); 2061da177e4SLinus Torvalds 2071da177e4SLinus Torvalds copy_info(info, "\t\tCommands Queued %ld\n", dev->commands_issued); 2081da177e4SLinus Torvalds copy_info(info, "\t\tCommands Active %d\n", dev->active); 2091da177e4SLinus Torvalds copy_info(info, "\t\tCommand Openings %d\n", dev->openings); 2101da177e4SLinus Torvalds copy_info(info, "\t\tMax Tagged Openings %d\n", dev->maxtags); 2111da177e4SLinus Torvalds copy_info(info, "\t\tDevice Queue Frozen Count %d\n", dev->qfrozen); 2121da177e4SLinus Torvalds } 2131da177e4SLinus Torvalds 2141da177e4SLinus Torvalds static int 2151da177e4SLinus Torvalds ahd_proc_write_seeprom(struct ahd_softc *ahd, char *buffer, int length) 2161da177e4SLinus Torvalds { 2171da177e4SLinus Torvalds ahd_mode_state saved_modes; 2181da177e4SLinus Torvalds int have_seeprom; 2191da177e4SLinus Torvalds u_long s; 2201da177e4SLinus Torvalds int paused; 2211da177e4SLinus Torvalds int written; 2221da177e4SLinus Torvalds 2231da177e4SLinus Torvalds /* Default to failure. */ 2241da177e4SLinus Torvalds written = -EINVAL; 2251da177e4SLinus Torvalds ahd_lock(ahd, &s); 2261da177e4SLinus Torvalds paused = ahd_is_paused(ahd); 2271da177e4SLinus Torvalds if (!paused) 2281da177e4SLinus Torvalds ahd_pause(ahd); 2291da177e4SLinus Torvalds 2301da177e4SLinus Torvalds saved_modes = ahd_save_modes(ahd); 2311da177e4SLinus Torvalds ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); 2321da177e4SLinus Torvalds if (length != sizeof(struct seeprom_config)) { 2331da177e4SLinus Torvalds printf("ahd_proc_write_seeprom: incorrect buffer size\n"); 2341da177e4SLinus Torvalds goto done; 2351da177e4SLinus Torvalds } 2361da177e4SLinus Torvalds 2371da177e4SLinus Torvalds have_seeprom = ahd_verify_cksum((struct seeprom_config*)buffer); 2381da177e4SLinus Torvalds if (have_seeprom == 0) { 2391da177e4SLinus Torvalds printf("ahd_proc_write_seeprom: cksum verification failed\n"); 2401da177e4SLinus Torvalds goto done; 2411da177e4SLinus Torvalds } 2421da177e4SLinus Torvalds 2431da177e4SLinus Torvalds have_seeprom = ahd_acquire_seeprom(ahd); 2441da177e4SLinus Torvalds if (!have_seeprom) { 2451da177e4SLinus Torvalds printf("ahd_proc_write_seeprom: No Serial EEPROM\n"); 2461da177e4SLinus Torvalds goto done; 2471da177e4SLinus Torvalds } else { 2481da177e4SLinus Torvalds u_int start_addr; 2491da177e4SLinus Torvalds 2501da177e4SLinus Torvalds if (ahd->seep_config == NULL) { 2511da177e4SLinus Torvalds ahd->seep_config = malloc(sizeof(*ahd->seep_config), 2521da177e4SLinus Torvalds M_DEVBUF, M_NOWAIT); 2531da177e4SLinus Torvalds if (ahd->seep_config == NULL) { 2541da177e4SLinus Torvalds printf("aic79xx: Unable to allocate serial " 2551da177e4SLinus Torvalds "eeprom buffer. Write failing\n"); 2561da177e4SLinus Torvalds goto done; 2571da177e4SLinus Torvalds } 2581da177e4SLinus Torvalds } 2591da177e4SLinus Torvalds printf("aic79xx: Writing Serial EEPROM\n"); 2601da177e4SLinus Torvalds start_addr = 32 * (ahd->channel - 'A'); 2611da177e4SLinus Torvalds ahd_write_seeprom(ahd, (u_int16_t *)buffer, start_addr, 2621da177e4SLinus Torvalds sizeof(struct seeprom_config)/2); 2631da177e4SLinus Torvalds ahd_read_seeprom(ahd, (uint16_t *)ahd->seep_config, 2641da177e4SLinus Torvalds start_addr, sizeof(struct seeprom_config)/2, 2651da177e4SLinus Torvalds /*ByteStream*/FALSE); 2661da177e4SLinus Torvalds ahd_release_seeprom(ahd); 2671da177e4SLinus Torvalds written = length; 2681da177e4SLinus Torvalds } 2691da177e4SLinus Torvalds 2701da177e4SLinus Torvalds done: 2711da177e4SLinus Torvalds ahd_restore_modes(ahd, saved_modes); 2721da177e4SLinus Torvalds if (!paused) 2731da177e4SLinus Torvalds ahd_unpause(ahd); 2741da177e4SLinus Torvalds ahd_unlock(ahd, &s); 2751da177e4SLinus Torvalds return (written); 2761da177e4SLinus Torvalds } 2771da177e4SLinus Torvalds /* 2781da177e4SLinus Torvalds * Return information to handle /proc support for the driver. 2791da177e4SLinus Torvalds */ 2801da177e4SLinus Torvalds int 2811da177e4SLinus Torvalds #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) 2821da177e4SLinus Torvalds ahd_linux_proc_info(char *buffer, char **start, off_t offset, 2831da177e4SLinus Torvalds int length, int hostno, int inout) 2841da177e4SLinus Torvalds #else 2851da177e4SLinus Torvalds ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, 2861da177e4SLinus Torvalds off_t offset, int length, int inout) 2871da177e4SLinus Torvalds #endif 2881da177e4SLinus Torvalds { 2891da177e4SLinus Torvalds struct ahd_softc *ahd; 2901da177e4SLinus Torvalds struct info_str info; 2911da177e4SLinus Torvalds char ahd_info[256]; 2921da177e4SLinus Torvalds u_long l; 2931da177e4SLinus Torvalds u_int max_targ; 2941da177e4SLinus Torvalds u_int i; 2951da177e4SLinus Torvalds int retval; 2961da177e4SLinus Torvalds 2971da177e4SLinus Torvalds retval = -EINVAL; 2981da177e4SLinus Torvalds ahd_list_lock(&l); 2991da177e4SLinus Torvalds #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) 3001da177e4SLinus Torvalds TAILQ_FOREACH(ahd, &ahd_tailq, links) { 3011da177e4SLinus Torvalds if (ahd->platform_data->host->host_no == hostno) 3021da177e4SLinus Torvalds break; 3031da177e4SLinus Torvalds } 3041da177e4SLinus Torvalds #else 3051da177e4SLinus Torvalds ahd = ahd_find_softc(*(struct ahd_softc **)shost->hostdata); 3061da177e4SLinus Torvalds #endif 3071da177e4SLinus Torvalds 3081da177e4SLinus Torvalds if (ahd == NULL) 3091da177e4SLinus Torvalds goto done; 3101da177e4SLinus Torvalds 3111da177e4SLinus Torvalds /* Has data been written to the file? */ 3121da177e4SLinus Torvalds if (inout == TRUE) { 3131da177e4SLinus Torvalds retval = ahd_proc_write_seeprom(ahd, buffer, length); 3141da177e4SLinus Torvalds goto done; 3151da177e4SLinus Torvalds } 3161da177e4SLinus Torvalds 3171da177e4SLinus Torvalds if (start) 3181da177e4SLinus Torvalds *start = buffer; 3191da177e4SLinus Torvalds 3201da177e4SLinus Torvalds info.buffer = buffer; 3211da177e4SLinus Torvalds info.length = length; 3221da177e4SLinus Torvalds info.offset = offset; 3231da177e4SLinus Torvalds info.pos = 0; 3241da177e4SLinus Torvalds 3251da177e4SLinus Torvalds copy_info(&info, "Adaptec AIC79xx driver version: %s\n", 3261da177e4SLinus Torvalds AIC79XX_DRIVER_VERSION); 3271da177e4SLinus Torvalds copy_info(&info, "%s\n", ahd->description); 3281da177e4SLinus Torvalds ahd_controller_info(ahd, ahd_info); 3291da177e4SLinus Torvalds copy_info(&info, "%s\n", ahd_info); 3301da177e4SLinus Torvalds copy_info(&info, "Allocated SCBs: %d, SG List Length: %d\n\n", 3311da177e4SLinus Torvalds ahd->scb_data.numscbs, AHD_NSEG); 3321da177e4SLinus Torvalds 3331da177e4SLinus Torvalds max_targ = 15; 3341da177e4SLinus Torvalds 3351da177e4SLinus Torvalds if (ahd->seep_config == NULL) 3361da177e4SLinus Torvalds copy_info(&info, "No Serial EEPROM\n"); 3371da177e4SLinus Torvalds else { 3381da177e4SLinus Torvalds copy_info(&info, "Serial EEPROM:\n"); 3391da177e4SLinus Torvalds for (i = 0; i < sizeof(*ahd->seep_config)/2; i++) { 3401da177e4SLinus Torvalds if (((i % 8) == 0) && (i != 0)) { 3411da177e4SLinus Torvalds copy_info(&info, "\n"); 3421da177e4SLinus Torvalds } 3431da177e4SLinus Torvalds copy_info(&info, "0x%.4x ", 3441da177e4SLinus Torvalds ((uint16_t*)ahd->seep_config)[i]); 3451da177e4SLinus Torvalds } 3461da177e4SLinus Torvalds copy_info(&info, "\n"); 3471da177e4SLinus Torvalds } 3481da177e4SLinus Torvalds copy_info(&info, "\n"); 3491da177e4SLinus Torvalds 3501da177e4SLinus Torvalds if ((ahd->features & AHD_WIDE) == 0) 3511da177e4SLinus Torvalds max_targ = 7; 3521da177e4SLinus Torvalds 3531da177e4SLinus Torvalds for (i = 0; i <= max_targ; i++) { 3541da177e4SLinus Torvalds 3551da177e4SLinus Torvalds ahd_dump_target_state(ahd, &info, ahd->our_id, 'A', 3561da177e4SLinus Torvalds /*target_id*/i, /*target_offset*/i); 3571da177e4SLinus Torvalds } 3581da177e4SLinus Torvalds retval = info.pos > info.offset ? info.pos - info.offset : 0; 3591da177e4SLinus Torvalds done: 3601da177e4SLinus Torvalds ahd_list_unlock(&l); 3611da177e4SLinus Torvalds return (retval); 3621da177e4SLinus Torvalds } 363