| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Aic94xx SAS/SATA driver access to shared data structures and memory |
|---|
| 3 | 4 | * maps. |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Copyright (C) 2005 Adaptec, Inc. All rights reserved. |
|---|
| 6 | 7 | * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This file is licensed under GPLv2. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This file is part of the aic94xx driver. |
|---|
| 11 | | - * |
|---|
| 12 | | - * The aic94xx driver is free software; you can redistribute it and/or |
|---|
| 13 | | - * modify it under the terms of the GNU General Public License as |
|---|
| 14 | | - * published by the Free Software Foundation; version 2 of the |
|---|
| 15 | | - * License. |
|---|
| 16 | | - * |
|---|
| 17 | | - * The aic94xx driver is distributed in the hope that it will be useful, |
|---|
| 18 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 19 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 20 | | - * General Public License for more details. |
|---|
| 21 | | - * |
|---|
| 22 | | - * You should have received a copy of the GNU General Public License |
|---|
| 23 | | - * along with the aic94xx driver; if not, write to the Free Software |
|---|
| 24 | | - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| 25 | | - * |
|---|
| 26 | 8 | */ |
|---|
| 27 | 9 | |
|---|
| 28 | 10 | #include <linux/pci.h> |
|---|
| .. | .. |
|---|
| 424 | 406 | u8 sas_addr[SAS_ADDR_SIZE]; |
|---|
| 425 | 407 | u8 pcba_sn[ASD_PCBA_SN_SIZE]; |
|---|
| 426 | 408 | /* Here start the other segments */ |
|---|
| 427 | | - u8 linked_list[0]; |
|---|
| 409 | + u8 linked_list[]; |
|---|
| 428 | 410 | } __attribute__ ((packed)); |
|---|
| 429 | 411 | |
|---|
| 430 | 412 | struct asd_manuf_phy_desc { |
|---|
| .. | .. |
|---|
| 467 | 449 | u8 type; |
|---|
| 468 | 450 | u8 node_desc_index; |
|---|
| 469 | 451 | u8 conn_desc_index; |
|---|
| 470 | | - u8 _recvd[0]; |
|---|
| 452 | + u8 _recvd[]; |
|---|
| 471 | 453 | } __attribute__ ((packed)); |
|---|
| 472 | 454 | |
|---|
| 473 | 455 | #if 0 |
|---|
| .. | .. |
|---|
| 496 | 478 | u8 size_sideband_desc; |
|---|
| 497 | 479 | u32 _resvd; |
|---|
| 498 | 480 | u8 name[16]; |
|---|
| 499 | | - struct asd_ms_sb_desc sb_desc[0]; |
|---|
| 481 | + struct asd_ms_sb_desc sb_desc[]; |
|---|
| 500 | 482 | } __attribute__ ((packed)); |
|---|
| 501 | 483 | |
|---|
| 502 | 484 | struct asd_nd_phy_desc { |
|---|
| 503 | 485 | u8 vp_attch_type; |
|---|
| 504 | | - u8 attch_specific[0]; |
|---|
| 486 | + u8 attch_specific[]; |
|---|
| 505 | 487 | } __attribute__ ((packed)); |
|---|
| 506 | 488 | |
|---|
| 507 | 489 | #if 0 |
|---|
| .. | .. |
|---|
| 521 | 503 | u8 size_phy_desc; |
|---|
| 522 | 504 | u8 _resvd; |
|---|
| 523 | 505 | u8 name[16]; |
|---|
| 524 | | - struct asd_nd_phy_desc phy_desc[0]; |
|---|
| 506 | + struct asd_nd_phy_desc phy_desc[]; |
|---|
| 525 | 507 | } __attribute__ ((packed)); |
|---|
| 526 | 508 | |
|---|
| 527 | 509 | struct asd_ms_conn_map { |
|---|
| .. | .. |
|---|
| 536 | 518 | u8 usage_model_id; |
|---|
| 537 | 519 | u32 _resvd; |
|---|
| 538 | 520 | struct asd_ms_conn_desc conn_desc[0]; |
|---|
| 539 | | - struct asd_ms_node_desc node_desc[0]; |
|---|
| 521 | + struct asd_ms_node_desc node_desc[]; |
|---|
| 540 | 522 | } __attribute__ ((packed)); |
|---|
| 541 | 523 | |
|---|
| 542 | 524 | struct asd_ctrla_phy_entry { |
|---|
| .. | .. |
|---|
| 560 | 542 | u8 id0; |
|---|
| 561 | 543 | u8 id1; |
|---|
| 562 | 544 | __le16 next; |
|---|
| 563 | | - u8 something_here[0]; |
|---|
| 545 | + u8 something_here[]; |
|---|
| 564 | 546 | } __attribute__ ((packed)); |
|---|
| 565 | 547 | |
|---|
| 566 | 548 | static int asd_poll_flash(struct asd_ha_struct *asd_ha) |
|---|