@@ -123,15 +123,15 @@ void insw (unsigned long port, void *dst, unsigned long count)
123
123
unsigned char * p ;
124
124
125
125
p = (unsigned char * )dst ;
126
-
126
+
127
127
if (!count )
128
128
return ;
129
-
129
+
130
130
switch (((unsigned long )p ) & 0x3 )
131
131
{
132
132
case 0x00 : /* Buffer 32-bit aligned */
133
133
while (count >=2 ) {
134
-
134
+
135
135
count -= 2 ;
136
136
l = cpu_to_le16 (inw (port )) << 16 ;
137
137
l |= cpu_to_le16 (inw (port ));
@@ -142,13 +142,13 @@ void insw (unsigned long port, void *dst, unsigned long count)
142
142
* (unsigned short * )p = cpu_to_le16 (inw (port ));
143
143
}
144
144
break ;
145
-
145
+
146
146
case 0x02 : /* Buffer 16-bit aligned */
147
147
* (unsigned short * )p = cpu_to_le16 (inw (port ));
148
148
p += 2 ;
149
149
count -- ;
150
150
while (count >=2 ) {
151
-
151
+
152
152
count -= 2 ;
153
153
l = cpu_to_le16 (inw (port )) << 16 ;
154
154
l |= cpu_to_le16 (inw (port ));
@@ -159,13 +159,13 @@ void insw (unsigned long port, void *dst, unsigned long count)
159
159
* (unsigned short * )p = cpu_to_le16 (inw (port ));
160
160
}
161
161
break ;
162
-
162
+
163
163
case 0x01 : /* Buffer 8-bit aligned */
164
164
case 0x03 :
165
165
/* I don't bother with 32bit transfers
166
166
* in this case, 16bit will have to do -- DE */
167
167
-- count ;
168
-
168
+
169
169
l = cpu_to_le16 (inw (port ));
170
170
* p = l >> 8 ;
171
171
p ++ ;
@@ -195,10 +195,10 @@ void insl (unsigned long port, void *dst, unsigned long count)
195
195
unsigned char * p ;
196
196
197
197
p = (unsigned char * )dst ;
198
-
198
+
199
199
if (!count )
200
200
return ;
201
-
201
+
202
202
switch (((unsigned long ) dst ) & 0x3 )
203
203
{
204
204
case 0x00 : /* Buffer 32-bit aligned */
@@ -208,14 +208,14 @@ void insl (unsigned long port, void *dst, unsigned long count)
208
208
p += 4 ;
209
209
}
210
210
break ;
211
-
211
+
212
212
case 0x02 : /* Buffer 16-bit aligned */
213
213
-- count ;
214
-
214
+
215
215
l = cpu_to_le32 (inl (port ));
216
216
* (unsigned short * )p = l >> 16 ;
217
217
p += 2 ;
218
-
218
+
219
219
while (count -- )
220
220
{
221
221
l2 = cpu_to_le32 (inl (port ));
@@ -227,7 +227,7 @@ void insl (unsigned long port, void *dst, unsigned long count)
227
227
break ;
228
228
case 0x01 : /* Buffer 8-bit aligned */
229
229
-- count ;
230
-
230
+
231
231
l = cpu_to_le32 (inl (port ));
232
232
* (unsigned char * )p = l >> 24 ;
233
233
p ++ ;
@@ -244,7 +244,7 @@ void insl (unsigned long port, void *dst, unsigned long count)
244
244
break ;
245
245
case 0x03 : /* Buffer 8-bit aligned */
246
246
-- count ;
247
-
247
+
248
248
l = cpu_to_le32 (inl (port ));
249
249
* p = l >> 24 ;
250
250
p ++ ;
@@ -293,10 +293,10 @@ void outsw (unsigned long port, const void *src, unsigned long count)
293
293
const unsigned char * p ;
294
294
295
295
p = (const unsigned char * )src ;
296
-
296
+
297
297
if (!count )
298
298
return ;
299
-
299
+
300
300
switch (((unsigned long )p ) & 0x3 )
301
301
{
302
302
case 0x00 : /* Buffer 32-bit aligned */
@@ -311,13 +311,13 @@ void outsw (unsigned long port, const void *src, unsigned long count)
311
311
outw (le16_to_cpu (* (unsigned short * )p ), port );
312
312
}
313
313
break ;
314
-
314
+
315
315
case 0x02 : /* Buffer 16-bit aligned */
316
-
316
+
317
317
outw (le16_to_cpu (* (unsigned short * )p ), port );
318
318
p += 2 ;
319
319
count -- ;
320
-
320
+
321
321
while (count >=2 ) {
322
322
count -= 2 ;
323
323
l = * (unsigned int * )p ;
@@ -329,11 +329,11 @@ void outsw (unsigned long port, const void *src, unsigned long count)
329
329
outw (le16_to_cpu (* (unsigned short * )p ), port );
330
330
}
331
331
break ;
332
-
333
- case 0x01 : /* Buffer 8-bit aligned */
332
+
333
+ case 0x01 : /* Buffer 8-bit aligned */
334
334
/* I don't bother with 32bit transfers
335
335
* in this case, 16bit will have to do -- DE */
336
-
336
+
337
337
l = * p << 8 ;
338
338
p ++ ;
339
339
count -- ;
@@ -348,7 +348,7 @@ void outsw (unsigned long port, const void *src, unsigned long count)
348
348
l2 = * (unsigned char * )p ;
349
349
outw (le16_to_cpu (l | l2 >>8 ), port );
350
350
break ;
351
-
351
+
352
352
}
353
353
}
354
354
@@ -365,10 +365,10 @@ void outsl (unsigned long port, const void *src, unsigned long count)
365
365
const unsigned char * p ;
366
366
367
367
p = (const unsigned char * )src ;
368
-
368
+
369
369
if (!count )
370
370
return ;
371
-
371
+
372
372
switch (((unsigned long )p ) & 0x3 )
373
373
{
374
374
case 0x00 : /* Buffer 32-bit aligned */
@@ -378,13 +378,13 @@ void outsl (unsigned long port, const void *src, unsigned long count)
378
378
p += 4 ;
379
379
}
380
380
break ;
381
-
381
+
382
382
case 0x02 : /* Buffer 16-bit aligned */
383
383
-- count ;
384
-
384
+
385
385
l = * (unsigned short * )p ;
386
386
p += 2 ;
387
-
387
+
388
388
while (count -- )
389
389
{
390
390
l2 = * (unsigned int * )p ;
@@ -415,7 +415,7 @@ void outsl (unsigned long port, const void *src, unsigned long count)
415
415
break ;
416
416
case 0x03 : /* Buffer 8-bit aligned */
417
417
-- count ;
418
-
418
+
419
419
l = * p << 24 ;
420
420
p ++ ;
421
421
0 commit comments